Description:
Dear sir,
I'm a Hong Kong programmer using Tomcat 4.1.24, Struts 1.1, MySQL 4.0 and Connector/J 3.0.8 to develop a web application on Windows 2000 platform. What problem I met is that when I input a string like "Peter's Apple" in a database with character set is Big5. I hope that this is my mistake rather than a bug in the JDBC driver.
Thank you.
David
How to repeat:
My Windows 2000 locale has set to Chinese (Hong Kong), JSP has the starting tag <%@ page contentType="text/html;charset=utf-8" %>, servlet has the line request.setCharacterEncoding("UTF8");. I use the connection pool that come with Struts by using the connection url:
jdbc:mysql://127.0.0.1/test?useUnicode=true&characterEncoding=big5
The application is quite good for input both English and Tradition Chinese without any special characters. Unfortunately when I input the string with "'", the Java throws the exception. Then I down grade the Connector/J version to 2.0.14, that's fine.