November 15th, 2012, 03:16 PM
Stripping UNICODE NULLS from mysql tables
We've got some data that was imported into our mysql 5.5 utf8 database from some kind of multi-byte encoded file. I'm told there are 'UNICODE NULLS' inserted amongst the ASCII I'm seeing in the table. I don't know what the characters are, but they appear as spaces when I do a select--
Anybody have any ideas on how we can strip these characters out? They're not in every row. They blow up our code that renders PDF and CSV exports of reports.
Normal value: A006168
Unicode NULL contaminated value: A 0 0 6 1 7 2
Any guidance is appreciated. Not a newbie, so I can handle a 10,000 ft view of the topic.
November 15th, 2012, 08:41 PM
November 17th, 2012, 12:11 AM
Hmmm... That looks promising. I was searching google and forums with queries about 'mysql unicode nulls'.. Looks like that wasn't a wide enough net. That blog posting is specifically talking about SQL Server, but he's using CAST and REPLACE, which I think are in mySQL.
I'll try it out on Monday...
Thanks a LOT. I'll let you know how it goes.