Re: problems with charset
Posted by: Rick James
Date: July 31, 2010 09:08AM

SET NAMES controls what the application claims the bytes are encoded as.
Your table says the name and value are encoded in the database as latin2.
If you have done SET NAMES utf8, then bytes will be converted between utf8 and latin2 during INSERTs (utf8->latin2) and SELECTs (latin2->utf8).

A typical problem is that the _bytes_ in your application do not match what you do in SET NAMES. This leads to garbage in the table, which may or may not lead to troubles. (Sometimes, the garbage that is INSERTed is undone on SELECT, thereby masking the mess.)

Do this at essentially the same place where you are doing INSERTs/SELECTs:
SHOW VARIABLES LIKE 'character%';
That may give us another clue.

Options: ReplyQuote


Subject
Views
Written By
Posted
5264
July 26, 2010 05:30AM
2177
July 27, 2010 11:57PM
1872
July 28, 2010 08:22AM
1824
July 28, 2010 09:32AM
1782
July 30, 2010 07:12AM
1776
July 30, 2010 09:23AM
1784
July 31, 2010 05:31AM
Re: problems with charset
1865
July 31, 2010 09:08AM
1791
August 03, 2010 04:30AM


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.