Displaying in Thai or Chinese characthers

Hi,

Anybody knows how to display characters in Thai or Chinese from MS SQL 2000 using Java or JSP?

Please advise, Thanks.


Regards,
Rianto
riantoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

girionisCommented:
Set the encoding of the JSP to UTF-8 this should work. If not check a few things

1) Are the characters saved correctly in the database (can you see chinese/thai from the database at all)?
2) In what encoding are they saved?
3) What do you see in the JSP page?
0
TimYatesCommented:
And do you have the correct fonts installed to be able to see that chars in the first place?
0
TimYatesCommented:
that = the :-/
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

krakatoaCommented:
As Tim says, you need the correct fonts on your machine. (Or at leat the target machine).
0
krakatoaCommented:
Batang should handle both of these I think.
0
riantoAuthor Commented:
Thanks for the reply.

Yes, I've set the regional setting to Thai, I can see Thai in my XP machine.
When I manually inputted the Thai characters into DB through SQL enterprise manager, I can see the Thai characters and display out correctly in JSP.
Problem arise when I add the Thai characters from the JSP into MS SQL.
Sorry for not being detailed and clear enough.

Girionis, regarding the question:
1. In Database, Encoding: THAI_CI_AS.
    If I input manually into DB, it can display Thai correctly.
    If I input from JSP into DB, it display ??????????????? (even in the DB itself).
2. I've put <%@ page pageEncoding="UTF-8" %> on top of the JSP page.
    Do I need to add in this line?
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
3. "???????????????" for the input from JSP into DB.
0
girionisCommented:
1) What is the encoding of the JSP page when you input the characters into the db?

2) No
0
riantoAuthor Commented:
Instead of putting <%@ page pageEncoding="UTF-8" %> on top of every page, I've put the following codes on top of every page:

"<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
</head>"

It works now both retrieving and output, But why does it store funny characters like "&#3609;&#3585;&#3634;" into the Database?
Anyway around it?


0
girionisCommented:
These are characters that cannot be represented properly in the database's encoding.
0
girionisCommented:
> Anyway around it?

Check the db encoding and the encoding of the jsp that writes into the database. They should be the same.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
riantoAuthor Commented:
Thanks for the answer girionis, now it provides me greater understanding.
But I still can't insert the right Thai characters inside the DB, it shows wrong characters even in Tomcat System.out.println before being inserted into the DB.

I'm really grateful with your help.
To be fair, I'm accepting the answer as I didn't mention the newly found problems in the question.
I've posted another question regarding how to insert the Thai characters correctly inside MS SQL DB under username: "rospcc", and give 500 points.
Please assist me on that thread..Thanks.
0
girionisCommented:
Ok I will have a look and do my best. Thank you for accepting :)
0
riantoAuthor Commented:
Hi Venabili,

the other one is my boss' account, not mine.
I'm just borrowing from her for a while.
0
VenabiliCommented:
>I'm just borrowing from her for a while.
Which means that you use two account at the same time (for not paying for points for example) Which is also a violation...
0
riantoAuthor Commented:
I'm not a paid subscriber, but my boss is. I'm not interested in getting the free points or whatsoever.
I'm using his account for convenience sake.
If you don't allow me to have my account, but to only can represent my boss to post his questions, or just he himself can post questions without delegating to me, then please terminate my account to solve all headache.
Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.