Bug #62163 russian charset problems
Submitted: 14 Aug 2011 12:16 Modified: 8 Apr 2012 10:43
Reporter: Radik Nuriev Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.4.3 OS:Windows (Windows 7 professinal)
Assigned to: Bogdan Degtyariov CPU Architecture:Any
Tags: charset, net connector, russian

[14 Aug 2011 12:16] Radik Nuriev
Description:
Hello! 
I have prolems with russian charset. There are errors or wrong symbols with russian characters when i use insert and select commands via my aspx pages (that means using mysql connector). However it is ok if i do this operations via mysql command line client. I did try cp1251 and utf8. i created two DB.

The charsets for the first one are:
1)charset client - cp1251
2) charset connection - cp1251
3) charset database - utf8
4) charset results - cp1251
5) charset server - utf8

Tables charset is utf8. I set charset to cp1251 in aspx connection string.Did not work. I tried  to set charset to utf8 in connection string utf8. Did not work. However it is ok by using MySQL command Line client with charset cp1251. 

The charsets for second DB are
1)vcharset client - cp1251
2) charset connection - cp1251
3) charset database - cp1251
4) charset results - cp1251
5) charset server - cp1251

It is the same problem too...(((

MySQL connector version is - MySQL Connector Net 6.4.3
Server version is - MySQL Server 5.5
Workbench is 5.2.34
Visual Studio is VS2010
OS is Windows XP Pro RU

So i can't make insert and select operations work correct via aspx page. But these operation are fine if i use command line client.

How to repeat:
repeat insert select operations.
[14 Aug 2011 15:58] Radik Nuriev
i have just found out...
if i use only my aspx page to insert and select data - all seems good and if i use just mysql cmd client all seems to be good too. However if i retireve data (that was inserted by aspx page) using mysql cmd client i got wrogn symbols. And vice versa. So clients are uncompatible. But why does it happen? i use the same charset.
[8 Nov 2011 10:51] Bogdan Degtyariov
Hello Radik,

Can you make a table dump which has records inserted by both aspx page and mysql command line?

windows console applications (including mysql command line) are non-unicode, so the data might insert in different ways depending on OS and client settings.

Thanks.
[9 Dec 2011 7:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[25 Dec 2011 10:38] Radik Nuriev
Bogdan, hello!
I would like to resume reporting this case and i attach printscreens of VS and MySQL console client. The same problem if i use navicat to retrieve data that was populated by VS.So i am limited to use VS only to keep tables clean.
[25 Dec 2011 10:40] Radik Nuriev
"windows console applications (including mysql command line) are non-unicode, so the data might insert in different ways depending on OS and client settings"

Is tehre any solution if above is true?
[20 Jan 2012 11:13] Bogdan Degtyariov
Hi Radik,

Sorry for not coming back earlier to this report (I had plenty of other reports to process).

> "windows console applications (including mysql command line) are
> non-unicode, so the data might insert in different ways depending 
> on OS and client settings"

This is true when you use the command line client interactively (type queries right in the mysql> prompt). However, in the batch mode it should not really matter:

$ mysql --user=... --password=... my_database < my_table_dump.sql

By default all data is dumped and imported as utf8, which should server your purposes.
[28 Jan 2012 11:03] Radik Nuriev
Screen of charset problem

Attachment: charset_problem.jpg (image/jpeg, text), 159.92 KiB.

[28 Jan 2012 11:05] Radik Nuriev
Hi Bogdan!
Hope you are doing well! The charset problem is still actual for me. I provided screenshot. I would too much appreciate if you can tell me what is the my problem.
[28 Jan 2012 11:06] Radik Nuriev
i have changed OS
[8 Mar 2012 10:43] Bogdan Degtyariov
The windows command line is not unicode-friendly, that is why you need to set the system locale to russian CP-1251. On the screenshot I see the OS is trying to convert Russian symbols to ISO-8859-1, which gives a very peculiar pattern of symbols with ASCII codes >127.

You need to go to Control Panel -> Region And Language -> Administrative tab -> Change System Locale -> Russian (Russia).
Then Windows has to be rebooted to apply the settings.
[9 Apr 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".