Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4084816
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:29:18+00:00 2026-05-20T18:29:18+00:00

I have an encoding issue – I have data stored in a MySQL table.

  • 0

I have an encoding issue – I have data stored in a MySQL table. While doing some work, one of my columns in my table collected some oblesks and negation signs; or the usual diamond w/ a question mark depending on the encoding. Rather than manually changing each row, is there a quick way to seek and destroy the characters from the DB?

I’ve played with both my browser settings as well as using UTF-8, Western 1252 and ISO-8859-1. I was happy with how the data was encoded before, I just want to remove the improperly encoded whatevers out of the DB. I tried writing a quick PHP script to grab all the chars and replace them, but I can’t figure out what they even are. Any ideas?

Here are the characters as seen in UTF-8
 

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:29:18+00:00Added an answer on May 20, 2026 at 6:29 pm

    I don’t know if you can actually do this but

    UPDATE `table` SET column = replace(column, REGEXP '[\x00-\x1F\x80-\xFF]', '');
    

    Make sure you run this as a select first or do this in a temporary sandbox db. I dunno if this is legal in mysql.

    I know there are third party regex libraries that can do this but require changing your db. I don’t know how these work.

    • UDF

    EDIT

    You’re better off writing a little php script to do this for you. The above regex will work to strip out garbage characters.

    $data = preg_replace_all('/[\x00-\x1F\x80-\xFF]/', '', $data);
    

    Once again, if it wasn’t clear before: DO NOT BLINDLY PASTE IN MY ABOVE SQL STATEMENT as I have no idea what will actually happen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Encoding issues are among the one topic that have bitten me most often during
Maybe this is an encoding issue? I can't imagine that you have to replace
Ok, I understand that using strings that have special characters is an encoding issue.
I have some data that won't printf.... echo works, but not printf There is
I have to connect to a legacy postgres database which has ENCODING = 'SQL_ASCII';
I am looking for url encoding tips for SEO compliant site. I have a
I recently came across an encoding issue specific to how Firefox encodes URLs directly
I have a number of projects running on a Hudson slave. I'd like one
I have a small table of measurement units in Oracle (10.2.0.4). It's defined as
Have just started using Google Chrome , and noticed in parts of our site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.