Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!