This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes How to insert arabic letters  in MySql through jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to insert arabic letters  in MySql through jsp" Watch "How to insert arabic letters  in MySql through jsp" New topic
Author

How to insert arabic letters in MySql through jsp

zita lakshmi
Ranch Hand

Joined: Nov 13, 2009
Posts: 37
Hi

I have the Little improvement for the previous requirement.
I have two jsp pages.
first page see.jsp



Employee Name:كيف الحال
Employee id:402

Second page seedb.jsp


Second jsp page shows the result is

id isكيف الحالname is402Successfully database connect Successfully arabic table values are inserted id is:402 name is:كيف الحا




But the Mysql have the content format is numerical.
Name ID

كيف الحا 402

I need the requirement for storing data also have the arabic format in mysql.


Please reply me.

Thanks and Regards

Seetha.










Mukesh Ranjan
Greenhorn

Joined: Jun 24, 2009
Posts: 22
You have to use Unicode here to insert Arabic data into the database as mysql supports binary.
while viewing of data you have to read it in binary and have to keep encoding as utf-8

May it will help you
zita lakshmi
Ranch Hand

Joined: Nov 13, 2009
Posts: 37

Hi

Thanks for your reply.

I have the requirement for storing and retrieving of data also in arabic format. But retrieve the data in arabic format is possible for the previous code.I need storing of data also arabic format. It's possible or not.

I given the input is كيف الحال

In the Mysql store in following number format In previous message i have include in number format of data, but it automatically convert in the correct arabic format in your webpage so try to convey this time.

1603;
كيف الحا


But it shows in the output in Internet Explorer كيف الحال correct format.

In database I have set Table [ Collation - utf8_general_ci ] and [ Storage Engine - MyISAM ]


So it is Database Issue or Browser Issue.

please guide me.













 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to insert arabic letters in MySql through jsp
 
Similar Threads
form submission doesn't happen
How to make the server stop the page for evaluation
EL cookie Problem
javascript to jsp(i am sorry to post it once again please see the code i have everything ut does not
Character set encoding issue