-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Puny Sen wrote:
> Hi All,
>
> I'd like to use the same column to store content from multiple languages
> (English, German, French, Japanese).
>
> Here is my understanding of the options available.
>
> In MySQL 4.0:
>
> - UTF-8 is not currently available as a charset

True.

> - we can connect to the database using
> "useUnicode=true&characterEncoding=UTF-8" in the connection string.

True.

> - this enables us to store, search and retrieve Unicode content from the
> column, as long as we always use JDBC with the above connection string, to
> interact with the db.

True.

> - sorting will not work on the column

True.

>
> In MySQL 4.1:
>
> - UTF-8 is available as a charset

Yes, but remember, UTF-8 is an _encoding_ that can store many different
character sets, there is a difference.

> - We still neet to connect to the database using the above connection
string
> (doesn't seem to work otherwise)

Unless you set your database's default character set to UTF-8, then yes,
you do still need to have 'useUnicode=true&characterEncoding=UTF-8' in
your URL, which tells the driver that you will be mixing character sets
in your queries (so encode them as UTF-8), and also tells the server to
expect your queries to be encoded in UTF-8 (the driver does a 'SET NAMES
UTF-8' on connect in this case).

> - sorting will work, but only using the general utf8 collation (may
not work
> for Japanese?). More collations will be available soon.

True. If you know the column charset and collation that you want to use,
you should be able to use CAST on it to get it to a different charset,
and the sort using a compatible collation.

> - [can we cast/convert to a different charset (sjis) and use its collation
> for sorting? (performance is not really an issue)]

I guess I just answered that above :)

>
> Please let me know if any of these assumptions are incorrect.

They seem to be correct. Please let me know if you run into any issues
or inconsistencies with these assumptions, because the combination of
Unicode and UTF-8 support in the JDBC driver and the server is new (and
can in sometimes be complex, due to the flexibility it offers), and we'd
like to get any kinks worked out ASAP!

        -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/2J6ItvXNTca6JD8RAp3BAJ9sWug9JcCeqWrDGzg6XGc2bUTaWwCgxcap
SRKikpcyoo0St5ClUF9G4Dw=
=QaD8
-----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