3 messages in com.mysql.lists.javaRe: koi8 encoding problem| From | Sent On | Attachments |
|---|---|---|
| Megapoopsus | 26 Dec 2003 02:06 | |
| Mark Matthews | 26 Dec 2003 07:09 | |
| Megapoopsus | 26 Dec 2003 10:53 |
| Subject: | Re: koi8 encoding problem![]() |
|---|---|
| From: | Mark Matthews (ma...@mysql.com) |
| Date: | 12/26/2003 07:09:12 AM |
| List: | com.mysql.lists.java |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Megapoopsus wrote:
Hi,
I ran into a problem with KOI8-R encoding. If I set characterEncoding=KOI8-R in jdbc url, it is incorrectly mapped to koi8_ru. The result of this is that apparently connection charset is not set and statments like
This should now be fixed in the source repository. You can try a nightly snapshot after 00:00 GMT on Dec 27th from
select * from table_name where column_name='some_value'
return an SQLException: "Illegal mix of collations (koi8r_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='".
My sql doesn't have an encoding named koi8_ru. The correct name is koi8r.
The issue is that on MySQL-4.0 the encoding was called 'koi8_ru', and the 'new' name for it in MySQL-4.1 wasn't put into the Java -> MySQL character encoding mapping.
I found a temporary solution by converting all my tables to cp1251 and setting characterEncoding=Cp1251.
By the way, if I don't specify useUnicode and characterEncoding params in the url I get this SQLException: Syntax error or access violation, message from server: "Unknown character set: 'danish'". I don't know in what way Danish is related to koi8r or cp1251!
I've had this issue reported two other times, but nobody has ever been able to give me information that made it repeatable. What is your _server_ character set configured to be? If I can repeat the issue, I can fix it, but without someone generating a repeatable testcase, it's not probable that we'll 'stumble' on to a fix.
Regards,
-Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 557 2388 www.mysql.com
Are you MySQL Certified? http://www.mysql.com/certification/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/7E8utvXNTca6JD8RAtMSAJ9pB4JVXxq429GL1pVGGN9xttugVACdEj4r 8UC+8G6G6bFk4myR2vB9yIM= =fP+s -----END PGP SIGNATURE-----




