MySQL Encoding problem

My project is a web site written in Java (JSP/Servlet)

My Database is MySQL 5

Encoding of all pages are UTF-8

My problem is when I INSERT persian words (Arabic character) all of the persian characters will convert to '?' in the Table.

I test it even from a somple Java application and get the same result, But when I insert the same data from PHP everything is ok, I think something should change in the Java code not in the MySQL database.

What should I try?

Message was edited by:

Ehsun

[540 byte] By [Ehsuna] at [2007-11-26 22:22:02]
# 1
Read the docu for the Driver. I believe there is a specific parameter that has to be set. Also ensure that the DB is using UTF-8 as the default character set.
masijade.a at 2007-7-10 11:20:13 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Maybe this can help you: http://forum.java.sun.com/thread.jspa?threadID=5144589
ddoa at 2007-7-10 11:20:13 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...