Bug #51927 | Mapping for MySQL's latin1 character set in .NET connector | ||
---|---|---|---|
Submitted: | 10 Mar 2010 18:25 | Modified: | 22 Apr 2010 13:31 |
Reporter: | Anita Novello | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 6.x | OS: | Windows |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
Tags: | .net, charset, connector, Latin1 |
[10 Mar 2010 18:25]
Anita Novello
[15 Mar 2010 12:18]
Tonci Grgin
Hi Anita and thanks for your report. There is no CP1252 xml file c/NET can map to in /share/charsets so it's obsolete to talk of that. Further more, CP1252 is a superset of Latin1 so how come "...because MySQL's latin1 is the same as the Windows cp1252 character set"? As for Java, it is the *JVM* mapping that you refer to, same goes to CP932 for example. As for your test case, I just checked something similar in Bug#52046: cmd.CommandText = "INSERT INTO bug52046 VALUES (2,'€', and it works. I'll make sure I try your test case too.
[15 Mar 2010 12:23]
Tonci Grgin
Ummm, I'd like Bar to comment on this: | latin1 | cp1252 West European | latin1_swedish_ci | 1 |
[25 Mar 2010 10:38]
Anita Novello
Hi Tonci, thanks for your reply. If you see the MySQL Reference at http://dev.mysql.com/doc/refman/5.1/en/charset-we-sets.html about latin1, you'll read that "MySQL's latin1 is the same as the Windows cp1252 character set.". Hence I would expect mapping.Add("latin1", new CharacterSet("windows-1252", 1)); as mapping in .NET Connector. Best Regards.
[6 Apr 2010 10:22]
Tonci Grgin
Confirmed by Bar, verified as described. Thanks Anita.
[19 Apr 2010 19:19]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/106042 803 Reggie Burnett 2010-04-19 - changed mapping of latin1 from latin1 to windows-1252 (bug #51927)
[19 Apr 2010 19:25]
Reggie Burnett
fixed in 6.0.6, 6.1.4, 6.2.4, and 6.3.2
[22 Apr 2010 13:31]
Tony Bedford
An entry has been added to the 6.0.6, 6.1.4, 6.2.4 and 6.3.2 changelogs: In MySQL Connector/NET, the LoadCharsetMap() function of the CharSetMap class set the following incorrect mapping: mapping.Add("latin1", new CharacterSet("latin1", 1)); This meant that, for example, the Euro sign was not handled correctly. The correct mapping should have been: mapping.Add("latin1", new CharacterSet("windows-1252", 1)); This is because MySQL's latin1 character set is the same as the windows-cp1252 character set and it extends the official ISO 8859-1 or IANA latin1.
[12 May 2010 19:20]
Janaka Abeywardhana
referring to the following in the last comment above "An entry has been added to the 6.0.6, 6.1.4, 6.2.4 and 6.3.2 changelogs:" By is 6.3.2 a typo? This http://dev.mysql.com/doc/refman/5.0/en/connector-net-news-6-2-4.html says that the fix to this bug is in 6.2.4? Is there even a version 6.3.2 I'm confused. Thanks
[12 May 2010 19:23]
Janaka Abeywardhana
sorry, ignore that. Got my answer from here http://dev.mysql.com/doc/refman/5.1/en/connector-net-news.html Any body know when 6.2.4 will go GA?