-----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]

Reply via email to