when i insert persian information with use JEE6(JSF and JPA) my information save question mark for example "علی" ===> "???" my database is Mysql and my table is UTF-8 . when insert persian data directly in database is correct and save correct. i know that with change one property in JEE my problem go to solved but i don`t know where is it ?
A:
I think that you need to set the following parameters in your connection URL:
jdbc:mysql://host:port/db?useUnicode=true&characterEncoding=UTF-8
Pascal Thivent
2010-06-10 00:28:54
Jeus
2010-06-10 06:57:45
Jesper
2010-06-10 10:08:09
I change sun-resources.xml but not solvedhttp://paste.ideaslabs.com/show/XWBCp5zl0Y
Jeus
2010-06-10 14:11:26
@Jeus I suggest trying to isolate the problem. So write a simple class using JDBC to validate the connection URL. Once you'll get it working, work on the app server configuration.
Pascal Thivent
2010-06-10 17:05:30
i use JPA and i dont have problem in insert data correctly in database with query browser mysql but then insert with use my app insert ? in database
Jeus
2010-06-11 15:46:34
@Jeus I understood that so the MySQL setup seems ok. But is it working from Java? No? Is it a problem with the driver? You don't know. Is it a problem with the app server setup? You don't know. So try to isolate the problem, start with a simple Java class using JDBC to validate the behavior of the JDBC driver. Then work on the app server config.
Pascal Thivent
2010-06-11 16:05:06
i understand u and test all say u this is first app with jEE6 and already write other JSE app and this dosnt its problem with encoding . im run a already program for test again.and this work correct .
Jeus
2010-06-11 17:45:23