Bug #14908 utf-8 <-> cp1250 conversion table wrong
Submitted: 13 Nov 2005 15:29 Modified: 29 May 2013 11:24
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.12 OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[13 Nov 2005 15:29] [ name withheld ]
Description:
utf-8 <-> cp1250 conversion table is incorrect for (a least) the following characters: č, Č, Ć

the correct conversion codes from u8...latin2 are (as in recode):
cat test-u8.txt
šŠčČćĆžŽ
hexdump -C test-l2.txt
b9 a9 e8 c8 e6 c6 be ae
hexdump -C test-u8.txt
c5 a1 c5 a0 c4 8d c4 8c  c4 87 c4 86 c5 be c5 bd 

The bug is quite critical since it makes it impossible to use the same data in both windows (cp1250) and java (web) based applications (that use utf-8).

How to repeat:
from a java client using the connector/j, or from a linux client with locales set to utf8:

create table test (test varchar(200)) DEFAULT CHARSET=utf8;
insert into test (test) values ('šŠčČćĆžŽđĐ');

view the table data in windows (cp1250):
the čČĆ are displayed as '?'.
[13 Nov 2005 18:05] [ name withheld ]
this seem to be an windows odbc driver problem since it ignores the default code page on the windows and always uses latin1 as default (even when cp1250 is specified as the default-character-set in the client section of my.ini)

The problem can be solved if you issue 'set names cp1250' in windows.
[26 Nov 2005 9:07] Valeriy Kravchuk
Thank you for a problem report. So, the problem is not in with wrong conversion, but with the default settings for the clients?

Please, send the content of your my.cnf or my.ini file from the client that works only when you use explicit set names.
[27 Dec 2005 0: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".
[8 Feb 2007 14:17] Ivan
The problem is still there... I've tried using 'set names cp1250' but when I try to import data to Excel the letters đĐČčĆć are shown as ?????? BTW I've seen messages (from 2004) stating that v3.53 should solve this but it's nowhere to be found?
[9 Feb 2007 10:39] Valeriy Kravchuk
All reporters:

As this looks like Connector/ODBC-related problem (not server one), please, specify the exact version of Connector/ODBC used.
[9 Feb 2007 11:10] Ivan
I'm using Connector/ODBC 3.51.12 for Windows... MySQL server is version 4.1, all the tables are utf8... I've already tried using 'set names cp1250' as I've previosuly said, but letters ćĆčČđĐ are still missing
[10 Mar 2007 0: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".
[29 May 2013 11:24] Bogdan Degtyariov
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/