Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inserting arabic data into a database through a jsp

 
Maher Aldsabbas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic