Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Arabic text and mysql

843840Dec 17 2008 — edited Dec 25 2008
Hi,

I'm working on a web application in which user may write arabic text in form and save it into mysql DB.

when printing the inserted text on jsp, i get somthing like a garbage. I set the page charset to utf-8, the databse charset to utf-8, the tables and theire columns to ut-8 too. and still get the same result.

When i print the arabic entered text without inserting it, the text is perfect on jsp; the problem is when i print the one inserted into mysql database; so for sure the problem is in mysql dbms.

here is my url connection :
String url = "jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=utf8";
Before, i used this url :
String url = "jdbc:mysql://localhost:3306/mydb{code}
and the printed text is just question marks "????????????????? ????".

when adding those parameters:+useUnicode=true&characterEncoding=utf8+ the printed text is no more question marks, but like garbage (unreadable text & strange characters).

Any help or suggestion is welcome.

Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 22 2009
Added on Dec 17 2008
12 comments
1,212 views