-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ivan Jouikov wrote:
| I tried using those URL parameters. Doesn't change anything. | | |>-----Original Message----- |>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] |>Sent: Wednesday, July 14, 2004 2:30 AM |>To: Tomcat Users List |>Subject: Re: Retrieveing Unicode stuff from MySQL 4.1.x ? |> |>Ivan Jouikov wrote: |> |>>I tried to use table with CHARACTER SET UTF8, but it didn't change |> |>anything :( |> |>>Any other suggestions? |> |>I'm using a line like the one below to connect to the MySQL DB and it is |>working quite well here: |> |>DBUrl="jdbc:mysql://"+server+":"+databaseport+"/"+database+"?user="+login+ |>"&password="+password+"&useUnicode=true&characterEncoding=UTF-8"; |> |>You may want to specify "characterSetResults" as well. |> |>http://dev.mysql.com/doc/connector/j/en/index.html
Ivan,
You're going to have to do a little testing to see _where_ the character encoding is being lost.
You should first see if the strings that you are inserting into the database are the same as being retrieved, either in your JSP, or in a little testcase (I prefer JUnit myself), by using String's .equals() method and not your 'eyes'.
The reason to do this is to isolate the different stages of encoding/decoding from each other, because there's an encoding/decoding between the JDBC driver and the database, there is one yet again between your JSP and your browser, and there is many times one yet again between your browser and your operating system.
You will need to check at _each_ stage to make sure that the characters are encoded the way you think they are.
I can state from experience that _usually_ it's not at the database level, however, it's usually a mismatch somewhere else that these problems occur (but they are hard to debug sometimes :( )
Regards,
-Mark
- -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com
MySQL Guide to Lower TCO http://www.mysql.com/it-resources/white-papers/tco.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFA9U22tvXNTca6JD8RAibYAKDHK+QwHHPXuwK8COGp1XhxRM1s7wCdFmIf yxc3AlFTMt9LWvRxYdXwMoM= =6oIc -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]