aspose file tools*
The moose likes JSP and the fly likes I need to insert arabic text into a database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "I need to insert arabic text into a database" Watch "I need to insert arabic text into a database" New topic
Author

I need to insert arabic text into a database

maher dabbas
Greenhorn

Joined: Dec 02, 2001
Posts: 26
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

Joined: Nov 28, 2001
Posts: 60
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

Joined: Feb 02, 2001
Posts: 22
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

Joined: Feb 02, 2001
Posts: 22
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

Joined: Dec 02, 2001
Posts: 26
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

Joined: Dec 02, 2001
Posts: 26
Hi adam.
Thanks alot for your solution , it was brilliant,i owe you a big time.
Maher
Apirak Panatkool
Greenhorn

Joined: Apr 30, 2002
Posts: 15
What is the solution? I have the same problems.


bAnk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I need to insert arabic text into a database