This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes charsets didn't get it Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "charsets didn Watch "charsets didn New topic
Author

charsets didn't get it

Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Ranchers,

Whats Charset header? ( i am not asking definition)

How i can display "Good Morning" on browser in all languages probably using UTF-8.

How i can get Chinese language or Japanese font?

What all i need to accomplish the task.

Please tell me; any resource where i can get all i want;


Thanks & Regards, T.Srinivasan
SCWCD 1.4(89%), SCJP 5.0(75%)
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
The server sends the client a stream of bytes.But only with bytes the client cannot create a user character(By user character I mean printable characters) , unless it knows as what encoding has been used by the server.Using charset header the server specifies this.

If you encode your result using chineese charset , then mention that in the response header.It the client understands that charset it would properly show up the user characters.


Rahul Bhattacharjee
LinkedIn - Blog
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

As a follow up, this is a good summary.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Paul,

I will go through that link and back to you.
Seems interesting column.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9953
    
163

Originally posted by Paul Sturrock:
As a follow up, this is a good summary.


Great one!


[My Blog] [JavaRanch Journal]
Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Paul,

From the link given by you, I was able to know ...

1. Whats Unicode char set and code points.
2. How Code points stored in memory(Encoding schemes)
UTF-8, UCS-2,UTF-16.

3. If you send UTF-8 Encoded data to a browser where some other encoding is used then it will display ? whenever it encounters a codepoint not in its charset mapping. it can only replace the characters with its own encoded characters.

I got that much basics.
Thing is i am still not able accomplish the task.

What i want to do is display "Good Morning" in all languages.

If say Chinese means he should be able to see chinese font not any other converted font.

Pleas guide me.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


If say Chinese means he should be able to see chinese font not any other converted font.

The basic point is you need to properly set the content-type then the rest is up to the client browser/OS. The client environment (if we are talking about Windows here) will need at least one Chinese font installed, otherwise you will get blocks or question marks instead, since there is no encoding on the client capable of rendering the characters defined in your HTML. So, if you have the Chinese version of IE installed there will be no problem. If you have the English version, it may alert you that you need to download a language pack, though it may not. Download the Chinese language pack and try your page again.
Srinivasan thoyyeti
Ranch Hand

Joined: Feb 15, 2007
Posts: 557
Hi Paul,

I didn't get the link between Encoding and fonts.
Anyway i think i have no base to prolongue this issue to get my task done.

Thanks a lot Paul.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: charsets didn't get it
 
Similar Threads
platform's default character encoding
SCWCD 1.4 Books
Windows User Name
Size of File
Variable names