9 messages in com.mysql.lists.dotnetRe: utf8 charset problem| From | Sent On | Attachments |
|---|---|---|
| SharpCoderMP | 22 Feb 2006 10:10 | |
| Daniel Fisla | 22 Feb 2006 12:17 | |
| SharpCoderMP | 23 Feb 2006 03:32 | |
| SharpCoderMP | 23 Feb 2006 04:54 | |
| Daniel Fisla | 23 Feb 2006 05:48 | |
| SharpCoderMP | 23 Feb 2006 08:33 | |
| Daniel Fisla | 23 Feb 2006 09:55 | |
| SharpCoderMP | 23 Feb 2006 11:04 | |
| Daniel Fisla | 23 Feb 2006 13:06 |
| Subject: | Re: utf8 charset problem![]() |
|---|---|
| From: | Daniel Fisla (dfi...@itmatter.com) |
| Date: | 02/23/2006 05:48:23 AM |
| List: | com.mysql.lists.dotnet |
Take a look at your mysql log, you may need to run it with --log option.
For each connection the following happens for me:
Before connection:
character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | utf8 | | character_set_results | latin1 | | character_set_server | utf8 | | character_set_system | utf8
collation_connection | latin1_swedish_ci | | collation_database | utf8_bin | | collation_server | utf8_general_ci
7970 Query SHOW VARIABLES 7970 Query SHOW COLLATION 7970 Query SET NAMES utf8; SET character_set_results=NULL; SET collation_connection = @@collation_database;
After connection (you can just run the above commands via mysql client whne connected to the same database):
character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_results | | | character_set_server | utf8 | | character_set_system | utf8 |
| collation_connection | utf8_bin | | collation_database | utf8_bin | | collation_server | utf8_general_ci
For me collation_database is set to utf8_bin and in my connection string I have "charset=utf8;" param. What I would to is watch the mysql log for connections using ODBC driver and mysql-connector driver.
Cheers,
-Daniel Fisla.
SharpCoderMP wrote:
i'm afraid your solution didn't helped. i've got utf8 charset on all string columns with utf8_bin collation and i still get different results when using MyODBC and connector.net it seems like one of them puts different utf8 than the other. utf8 chars sent to DB with MyODBC are correctly red by MyODBC. the utf8 chars sent to DB with connector.net are correctly red by connector.net. but utf8 chars put by MyODBC are not correctly red by connector.net and vice versa. for the whole time i get upside down question mark instead of correct utf8 cars (of course besides standard 26 a-z chars). it looks like one of them does use utf8 and the other has totally no idea about it. but which is whch and what can i do with that?
Daniel Fisla wrote:
No need to get depressed. :-)
Check your character set and collation setting for table fields and connections. Look into utf8_general_ci vs utf8_unicode_ci collation settings.
The only way for me to get, full unicode support for all languages, right to left, left to right, arabic, korean, jap , etc... is to use collation setting of 'utf_bin' on the text/string fields you want to store unicode strings.
Cheers,
-Daniel.
SharpCoderMP wrote:
hi,
i have a problem with utf8 encoding. i have two apps. One uses MyODBC driver to put data into the mysql database. The other one uses connector.net - now the problem is that when i put some utf8 chars into table using one of my apps then i get wrong chars with the other app. how can i solve this stupid problem????
i'm totally depressed. i've been fighting this problem for the whole day, and i get all the time freaky results. i don't want to rewrite my whole app to use connector.net instead of MyODBC driver - i have no time for such a nonsense. what the hell is going on with this utf8 handling? there always been problems with iso8859-2 to win1250, iso8859-2 to utf8 conversions and now even utf8 to utf8 does not work the way it should. why? there is no conversion needed and this still does not work. maybe i'm so stupid that i miss something but please give me some clue. why the MyODBC driver is not compatibile with connector.net?
---------------------------------------------------------------------- Ocen dziewczyny Playboya!!! >>> http://link.interia.pl/f190f
---------------------------------------------------------------------- Ocen dziewczyny Playboya!!! >>> http://link.interia.pl/f190f




