MySQL Forums
Forum List  »  Newbie

Re: Can not get proper utf8 text
Posted by: Robert Lee
Date: June 09, 2011 08:16AM

I'm almost there.

HEX(CONVERT(CONVERT(member_username USING utf8) USING latin1)) does the trick for getting correct hex code.

However, I don't know how to convert hex value or bytes (from UNHEX(hax value)) to a utf8 string. I did read MySQL reference and also googled "mysql hex to utf8 string" and "mysql bytes to utf8 string", but could not find a function for such conversion.

I did use C# code to convert the utf8 bytes fields to unicode string and they came out right. But I would prefer to get the correct utf8 directly through a MySQL query without relying on post processing.

Please help. Thanks.


Options: ReplyQuote

Written By
Re: Can not get proper utf8 text
June 09, 2011 08:16AM

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.