Bug #15544 Setting code page to Cp437 on MySql 50 fails
Submitted: 7 Dec 2005 6:46 Modified: 10 Mar 2006 21:25
Reporter: Michael Ingardia
Status: Closed
Category:Connector/J Severity:S3 (Non-critical)
Version:5.0 OS:Microsoft Windows (XP)
Assigned to: Target Version:

[7 Dec 2005 6:46] Michael Ingardia
Description:
When using Cp437 in either the characterEncoding property or the characterSetResults for
example

jdbc:mysql:///[databaseName]?characterEncoding=Cp437

The server responds with:
java.sql.SQLException: Unknown character set: 'dos'

This is because there is no dos.xml file under the charactersets directory on the server. 
I was not able to find where dos.xml could be downloaded seperately and sicne the
documentation states that Cp437 is mapped to dos I would have expected this to work.  The
fix might be to just use a dos.xml file from a previous release but I am not sure.  Will
try this when I get to a machine that has an older release on it.

Mike...

How to repeat:
Try to execute a java program with either the characterEncoding or characterSetResult
property set to Cp437.

Suggested fix:
Provide a dos.xml file that corresponds to cp437 ( the xp / windows dos prompt character
set) in the distribution.
[7 Dec 2005 11:52] Vasily Kishkin
Thanks for the bug report. As far as I know mysql does't have "dos" character set.
Probably it is connector error in Charsets.properties:
....
....
Cp437 =				dos,\
...
...
My test case is attached.
[7 Dec 2005 11:52] Vasily Kishkin
Test case

Attachment: Bug15544.java (text/java), 579 bytes.

[19 Dec 2005 17:26] 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/262
[19 Dec 2005 17:28] 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/263
[10 Mar 2006 21:25] Mark Matthews
Fix will be available in 5.0.1 and 3.1.13. You can try a nightly snapshot from
http://downloads.mysql.com/snapshots.php#connector-j if you want to test the fix before
it's officially released. Thanks for the bug report.