Re: Fixing Double Enocoding With mysqldump
Update: I believe using mysqldump as stated will work to fix double encoding, but there is a caveat: it will drop at least some (all?) correctly encoded double byte utf8 characters. In other words, if you have correctly encoded multi-byte utf8 characters anywhere in your database, this is a bad idea.
I believe Rick's Plan A under "Fixing Double Encoding" will handle this better: as he suggests, the final IFNULL() will abort the conversion if the result is not valid utf8. The only downsides are that you have to do this per column and that I believe if you have both double encoded characters and valid utf8 characters in the same value it will also abort leaving the double encodings (this should pretty unusual).
For me, I have hundreds of columns that need to be fixed, so I'm considering an additional step in my original plan to preserve the correctly encoded double byte utf8 characters. I'll post again if I find something simple that works.
Subject
Views
Written By
Posted
5645
October 20, 2011 04:59PM
2490
October 21, 2011 07:23PM
2333
October 23, 2011 03:07PM
Re: Fixing Double Enocoding With mysqldump
2743
October 26, 2011 12:15PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.