Bug #44773 | Chinese database name in JDBC connection string is not working | ||
---|---|---|---|
Submitted: | 11 May 2009 5:56 | Modified: | 21 May 2009 10:03 |
Reporter: | Zunil John | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.0.8 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Chinese database, connection string |
[11 May 2009 5:56]
Zunil John
[11 May 2009 8:37]
Tonci Grgin
Hi Zunil and thanks for your report. Can you do two things for me please: o check if you can attach to that database from command line client o upgrade to c/J 5.1 as 5.0 is EOL-ed
[11 May 2009 8:48]
Tonci Grgin
A colleague of mine did some testing and here's what she found: o All characters appear to be 3byte UTF8 so it should work if o on Win and current CP supports those characters o or on Linux and system locale is UTF8 So, which OS do you use and how is it set up? Please attach my.cnf.ini file and paste output of SHOW VARIABLES LIKE '%char%'; command.
[11 May 2009 13:28]
Zunil John
SHOW VARIABLES LIKE '%char%' is haracter_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_filesystem binary character_set_results utf8 character_set_server latin1 character_set_system utf8 character_sets_dir D:\Program Files\MySQL\MySQL Server 5.0\share\charsets\ I am using Windows OS nad my Windows character set is CP1252. The DB is created with UTF8 character set. I am attching my.ini. The database characterset is latin1. My question is 1. Is it required that DB server is UTF8? I will have multiple DB's on the same server with different character set. 2. Connection string is a jaav string. Other things like table names in chines, queries containing chinese all works. Only DB name in connection string is not working.
[11 May 2009 13:28]
Zunil John
My.ini file
Attachment: my.ini (application/octet-stream, text), 8.73 KiB.
[21 May 2009 10:03]
Tonci Grgin
Zunil, you should definitely change character_set_server to utf8. The option --characterset-server is used to initialize all new client connections to a default characterset, which is, in your case, latin1. Thus it is not possible to use GBK chars in database name while connecting as they simply fall out of latin1 bmp.