This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence 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:
  • 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

I need to insert arabic text into a database  RSS feed

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I 'm collecting a user data from a html form , and this data is written in arabic. and i pass it to a jsp , and from the jsp to a Mysql database , but a set of question marks ??? will be stored in the database.
Any body can help me on this please??
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
store it like blob (images )

Originally posted by maher dabbas:
I 'm collecting a user data from a html form , and this data is written in arabic. and i pass it to a jsp , and from the jsp to a Mysql database , but a set of question marks ??? will be stored in the database.
Any body can help me on this please??


 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by maher dabbas:
I 'm collecting a user data from a html form , and this data is written in arabic. and i pass it to a jsp , and from the jsp to a Mysql database , but a set of question marks ??? will be stored in the database.
Any body can help me on this please??


 
Venugopal nandikolla
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think your database is currently set to use a characterset of US7ASCII (the default) - this is a 7 bit characterset so you can store ascii characters from CHR(0) to CHR(127). In order to store characters from CHR(0) to CHR(255) the database needs to use an 8 bit characterset.Set it to 8 bit characterset and when ever you retrieve these charecters(unicode) keep the font tag in between them so that you can see them properly in Arabic.
-V
 
maher dabbas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there.
I don't think that the problem is on the database, because i ' ve wrote a java program that establish a conection to MySQL database , and i expecitly pass an arabic parameter to the database through a prepared statement, and it worked !.i think that the problem is on the JSP character encoding , because i was suffering befor from retriving an arabic text from the database , when i retreived it and displayed it on HTML page , a set of ??? was displayed , but when i changed the charcterset of the jsp to WINDOWS-1256, it worked just fine.i've tried to do this on the JSP that handles the data insertion but it did not work.
Any other ideas pleas?
 
maher dabbas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi adam.
Thanks alot for your solution , it was brilliant,i owe you a big time.
Maher
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the solution? I have the same problems.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!