I'm migrating a servlet/JSP application from ISO-8859-1 to UTF-8.
I use Mysql 5.0.45 which is UTF-8 configured and Tomcat 5.5.12.
I manage to read UTF-8 characters from database and display them in HTML page.
Submitting form data with UTF-8 character is also successful.
The problem is when i execute an update query, UTF-8 characters in SQL request are damaged. Problem occurs in JVM around DBCP and jdbc driver, not in database.
I tested direct use of driver with DriverManager like this :
Connection co = DriverManager.getConnection(...,...,...);
and it's ok, UTF-8 characters are written correctly in database.
If i use connection from DBCP pool, character UTF-8 are considered as ISO 8859-1.
If a run Tomcat with -Dfile.encoding=UTF-8 JVM option, everything is ok ; but i can't use this work around because other applications use ISO 8859-1.
Someone has idea ? Thank's in advance