File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes inserting arabic data into a database through a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "inserting arabic data into a database through a jsp" Watch "inserting arabic data into a database through a jsp" New topic
Author

inserting arabic data into a database through a jsp

Maher Aldsabbas
Greenhorn

Joined: Nov 23, 2001
Posts: 2
I'm having a problem with inserting an arabic data into a MySql database through a jsp, I 'm collecting this data from an html form and post it to a jsp to do the insertion operation , when i post the data to the jsp , and print it through the jsp, it is printed correctly in arabic , but when i insert it into the database through the jsp a ??? is inserted .
Any ideas?
Po-yu Chien
Ranch Hand

Joined: Nov 01, 2001
Posts: 45
Is arabic endcoding double byted?
if so, you can try this:
byte bytes[] = request.getParameter('name').getBytes();
String arabString = new String(bytes, "your_encoding");
This work for traditional Chinese, hope this can help you.
Maher Aldsabbas
Greenhorn

Joined: Nov 23, 2001
Posts: 2
I 've tried this way , but it did not work,i still have ??? inserted into the database. but what do you mean by double byted?.by the way i used the encoding ISO-8859-6 .
If you hava any other ideas , please write me.
Thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inserting arabic data into a database through a jsp