Re: cannot change character set
Posted by: Rick James
Date: June 23, 2010 11:37PM

SHOW COLLATION;
will list the possible values.

Connections, etc:
http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html

latin capital letter O with double acute (U+0150) -- That is handled by both latin2 and utf8. But, please note that 0150 is "unicode", as distinct from either of those.

SET NAMES... "How and where exactly?" -- Treat the SET names as SQL to execute. That is, execute it in the same way you would an INSERT. But be sure to do it right after opening the connection. Sorry, I am not familiar with ado.net or C#, so I can't be more specific.

phpmyadmin and ado.net are separate connections; SET NAMES (hence SHOW VARAIBLES LIKE 'conn%') won't necessarily be the same for the two connections.

Where do your latin2 or utf8 characters come from? Some file? Some special keystrokes on the keyboard? Even knowing the answers to this question won't help much, because programming languages try to fix things for you. (But they tend to add extra encoding changes that you aren't expecting.) Again, I can't speak for ADO.NET or C#; I do know that Perl and PHP can mess characters up.

Do you have any characters that _might_ be stored in a table?
SELECT x, HEX(x), LENGTH(x), CHAR_LENGTH(x) FROM ...
If you find any case where LENGTH and CHAR_LENGTH are not equal, the you probably have latin2 or utf8 (even if 'x' itself shows as latin1). Show me the SELECT output, I might be able to say "you got the characters stored correctly; now the problem is reading them out". (Or they might have been messed up during the INSERT.)

Options: ReplyQuote


Subject
Views
Written By
Posted
6096
June 09, 2010 12:51PM
2651
June 13, 2010 09:44PM
7954
June 21, 2010 08:25AM
Re: cannot change character set
2727
June 23, 2010 11:37PM
4017
June 25, 2010 07:46AM
3685
June 26, 2010 01:30PM


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.