MySQL Forums
Forum List  »  General

serious mysql latin1 to utf8 error, attention please
Posted by: ye tian
Date: January 08, 2012 10:12PM

I use php to insert a hex byte to a mysql table, and use select hex() to get the real data; set names latin1, and table 's charset is utf8, so there is a translation from latin1 to utf8.

Hex: \x88
select hex from mysql: CB86

but I usemb_convert_encoding($hex, 'utf8', 'latin1');
get result: c288

I use utf8 to encode by hand, and get the same result: c288.
so why mysql translate latin1 to utf8 not the same with the standard way????

Options: ReplyQuote


Subject
Written By
Posted
serious mysql latin1 to utf8 error, attention please
January 08, 2012 10:12PM


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.