| Bug #8231 | Absence of cp1251cias in CharsetMapping.java | ||
|---|---|---|---|
| Submitted: | 1 Feb 2005 7:50 | Modified: | 5 Feb 2005 6:31 |
| Reporter: | Victor Pyankov | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / J | Severity: | S2 (Serious) |
| Version: | 3.1.6 | OS: | Any (All) |
| Assigned to: | CPU Architecture: | Any | |
[1 Feb 2005 7:57]
Victor Pyankov
CharsetMapping.java (fix)
Attachment: CharsetMapping.java (application/octet-stream, text), 14.32 KiB.
[5 Feb 2005 6:31]
Mark Matthews
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html

Description: In com/mysql/jdbc/CharsetMapping.java we can see only "cp1251" string in MYSQL_TO_JAVA_CHARSET_MAP array (see line 95). But for cp1251 code page MySql server (v 4.1.8) return serverCharsetIndex = 51. This is line 254 in CharsetMapping.java and "cp1251cias" string. As result server settings for cp1251 don't work for MySql 4.1.8 and Connector/J 3.1.6 How to repeat: See cource code: com/mysql/jdbc/CharsetMapping.java lines 60-106, 254 com/mysql/jdbc/Connection.java line 2877 (method configureClientCharacterSet()) Suggested fix: I don't know what is this "cp1251cias", but addition of tempMap.put("cp1251cias", "Cp1251"); after line 95 work for me.