views:

197

answers:

1

Hi
I've a SmartGWT application which interacts with a mysql database using rpc services.
Suppose it as a simple form with a textbox & two save & load buttons.
My database & tables & all fields collation is utf8_persian_ci.
All java source files & module html & xml files have saved with utf8 character set. & also I've a meta tag in module html file which contains my form :

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

my application works correctly in eclipse develpment mode & also in my local tomcat server. Then i put it on remote server (I compress it using jar.exe into a war file with -cvf flag & then upload it using my server's plesk control panel).
In this mode, when I load data from a mysql table (load a record from any table), data will load into my form with no problem, but when I want to save some data (in persian language), mysql just writes some ? (question sign) in characteristic table fields.

Any idea ?

A: 

What is your connection String to the database?

Make sure it has the encoding specified on it:

jdbc:mysql://localhost:3306/DB?useUnicode=true&characterEncoding=UTF-8
cherouvim
Ehsan Khodarahmi