• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I need to insert arabic text into a database

 
maher dabbas
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??
 
Adam Adams
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??

 
Venugopal nandikolla
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
 
Apirak Panatkool
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the solution? I have the same problems.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic