Hello Mark, Thanks for your help. I have one more question.
I am using the some tables with utf8 character set and some tables with latin1 character set. I am using the jdbc connection string from the properties file with the characterEncoding=UTF-8. I am not changing the jdbc connection string, but I need to access these tables with different character sets. I am getting the following error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' I can make all my tables utf8 to make my application work. Is this is only choice I have? Thank you, -Yayati -----Original Message----- From: Mark Matthews [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 2:21 PM To: Yayati Kasralikar Cc: [EMAIL PROTECTED] Subject: Re: Multiple languages in the same column -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yayati Kasralikar wrote: > We are using MySQL 4.1.1 with mysql-connector-java-3.1 JDBC Driver(nightly > snapshot). > > The only way we can store and display the Unicode content is by specifying > it in the jdbc connection string(url) like: > jdbc:mysql://localhost/database_name?useUnicode=true&characterEncoding=UTF-8 > > AND specifying the table/column type as CHARACTER SET utf8. e.g.: > > create table test_table (col1 VARCHAR(10) CHARACTER SET utf8) > > None of the followings we tried work, if we do not specify it in the jdbc > connection string(url) like: > jdbc:mysql://localhost/database_name?useUnicode=true&characterEncoding=UTF-8 > > 1.We tried to set database's default character set to UTF-8 like: > mysql>alter database database_name default character set utf8; > > 2.We tried to specify the table/column type as CHARACTER SET utf8 > > 3.We tried to set the default character set to utf-8 in the my.ini by adding > the following line: > default-character-set=utf8 > > Is my understanding correct? Yes. If you are going to mix character sets in the queries you are _sending_ to the server from the JDBC driver, then you need to tell the client to use UTF-8, like you have in your URL. I'll work on adding the ability for the driver to autodetect when your server's 'charset_client' is 'UTF-8'. -Mark - -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] - -- 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/2hUYtvXNTca6JD8RAhwoAKCKiK2No/++X2A6xqIRl0QuEcymbQCfSiQ+ fXuh3fYyeTJ97DAVIDGstOM= =ocUZ -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]