Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Storing and displaying of hindi records using JSP nad MySQL

843840Mar 5 2010 — edited Jun 28 2010
I have created a table named 'hindi' like this.
CREATE TABLE `hindi` (
`data` varchar(1000) character set utf8 collate utf8_bin default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

I have a js library which converts text inside a textarea into Hindi while typing.

I am getting the record in servlet using request.getParameter and simply saving it like
INSERT INTO `hindi` VALUES (?);

After saving कैसे हो if I am trying to see it from mysql using select * from... it is displaying
��स� ह�

I tried to fetch the records like this
SET NAMES utf8;
select * from hindi;
and in java code i am doing rs.getString and displaying

But what it is displaying is something like this in the browser
��स� ह�

I have set my content type to this "text/html; charset=utf8"

Can anyone help me in that? I am kind of stuck.
Please dont tell me to use google transliteration.

Thanks in advance. :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2010
Added on Mar 5 2010
9 comments
2,290 views