Bug #29367 | Encoding issue with ODBC Connector 3.51.16 on IIS/ASP pages | ||
---|---|---|---|
Submitted: | 26 Jun 2007 17:27 | Modified: | 28 Sep 2007 12:07 |
Reporter: | Alexandre Madurell | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51.16 | OS: | Windows (XP Professional IIS5.0) |
Assigned to: | CPU Architecture: | Any | |
Tags: | ASP, connector, IIS, utf8 |
[26 Jun 2007 17:27]
Alexandre Madurell
[5 Jul 2007 10:01]
Alexandre Madurell
Update: I was still having problems with russian text on 3.51.12, so I tried once again the 3.51.16. All other text seemed to work fine this time, except the russian one. Another curious thing: With either one version, if I set a LongText field with a utf8_bin collation, the utf8 data stored in the table (containing german or french characters which I can see and edit perfectly in MySQL Query Browser) is displayed as chinese characters in the asp page (even the regular characters!). Switching collation to utf8_unicode_ci allows the text to be displayed properly. Still, the russian characters don't appear as chinese ones, but as question marks instead, no matter what collation I use. Any advise is very welcome.
[26 Jul 2007 10:13]
Tonci Grgin
Hi Alexandre and thanks for your report. Can you please do the following: - Attach my.ini file - Attach general query log at the time update / insert of data occurs - If possible, attach table files with data that is displayed wrongly (frm, myi and myd) - If not, please attach DDL script with table structure and some data - ODBC DM trace might help too I suspect there is a mixup with charsets and collations somewhere. You can also try new MyODBC 3.51.17.
[26 Aug 2007 23: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 Aug 2007 10:37]
Sveta Smirnova
Russian Cyrillic in UTF8 table and MyODBC work fine for me.
[29 Aug 2007 10:51]
Sveta Smirnova
test case
Attachment: bug29367.c (text/plain), 1.99 KiB.
[28 Sep 2007 10:05]
Tonci Grgin
This is probably a duplicate of Bug#13465. Will consult Bogdan.
[28 Sep 2007 11:56]
Bogdan Degtyariov
It looks as the problem is in ADO library. The problem appeared since SQLDescribeCol is fixed (now it returns the column size in characters instead of bytes). Here are the details: CREATE TABLE `companies` ( `Rdid` varchar(40) NOT NULL default '', `MktgContactTitle` varchar(40) default NULL, PRIMARY KEY (`Rdid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; both varchar(40) columns are multibyte columns, SELECT LENGTH(MktgContactTitle) returns 80 bytes. When doing SELECT from the table ADO checks the size of the column in characters (not bytes) for SQLDescribeCol. Everything is ok so far. Next call is confusing: the application has to pass the size of the buffer in bytes for SQLBindCol()! But the buffer size is 40 (maybe application considers that it is in chars) instead of 80 bytes. Here you can see that the buffer length is in bytes: http://msdn2.microsoft.com/en-us/library//ms711010.aspx
[28 Sep 2007 12:07]
Tonci Grgin
After much consideration, I've decided to mark this bug a duplicate of Bug#13465.