This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

inserting arabic data into a database through a jsp  RSS feed

 
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?
 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!