But then when I do something with these parameters and my mysql database I get then them wrong encoded and all data read from mysql are wrong encoded .
Hmmm... if you use your Java code to insert some text into the DB, does it look okay when you read it back out using the mysql command-line tool? I'm wondering if the characters are being mangled on the way into of out of the database.
See... the UTF-8 encoding only comes into play when converting bytes from the request into Strings on which your Java code operates. Once you're in the Java world, everything should be okay. Again, when you write the data back out to the response, the UTF-8 comes into play as well.
However, when writing to the db, the strings also need to be converted to bytes by some character encoding. It's very possible that either the VM and/or MySQL are using incompatible character sets. Check to see what the value of the system property "file.encoding" is at runtime.
Then again... unless you really are using multibyte characters, you should be okay no matter what. The MySQL JDBC driver should be using the same encoding going both to and from the db. But, if it's an encoding that doesn't understand multibyte characters (like ISO-8859-1), then you might be permanently damaging those characters. Though I use MySQL/Java all the time, I'm not sure how to set the character encoding for the JDBC driver. Check the MySQL documentation, and let us know what you find.
Hope that helps, -chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
