#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    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--

    Code:
    Normal value: A006168
    
    Unicode NULL contaminated value: A 0 0 6 1 7 2
    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.

    Any guidance is appreciated. Not a newbie, so I can handle a 10,000 ft view of the topic.

    mtf
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    98
    Rep Power
    2
    First search on google:

    http://blogs.visigo.com/chriscoulson...in-sql-server/

    Does this help at all?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0
    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.

    mtf

IMN logo majestic logo threadwatch logo seochat tools logo