1

Using this question, I'm able to find non-ascii characters using this query below. The only problem is that I still don't know what the value of the non-ascii character is in some of the records. How do I simply take any non-ascii character found and update it with a simple space?

SELECT whatever
  FROM tableName 
 WHERE columnToCheck <> CONVERT(columnToCheck USING ASCII)
Community
  • 1
  • 1
Rocco The Taco
  • 3,695
  • 13
  • 46
  • 79
  • Unfortunately mysql doesn't support regex-based replace, which would be the simplest approach if available. I would use your favorite app language to read, use regex replace, then write back to the db – Bohemian Feb 12 '14 at 20:55
  • Not in MySQL directly usually. I'd do it in the application, [or you can install something like this](https://github.com/mysqludf/lib_mysqludf_preg) – Wrikken Feb 12 '14 at 20:56

0 Answers0