File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes UTF-8, Unicode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "UTF-8, Unicode" Watch "UTF-8, Unicode" New topic

UTF-8, Unicode

Rafal Chmielecki

Joined: Apr 04, 2001
Posts: 5
Hello all,
I have some problems - still with internationalization:
1)What is the difference between UTF-8 and Unicode? is it the same thing?
2) how to set all necessary headers, @page directives etc. to enable the unicode encoding on the webpage?
3) when I use some bean, and launch some bean methods with String parameters, they're converted to a different codepage, how to avoid this?
4) Do all the browsers support Unicode or UTF-8?
This is very urgent, thank you in advance
Rafal Chmielecki
Warsaw, Poland

Rafal Chmielecki<BR>Pogrammer<BR>Inteligo S.A.(Warsaw, Poland)
manav kher
Ranch Hand

Joined: Nov 21, 2000
Posts: 98
i don't know all the answers but UTF is unicode 8 bit (i byte) and UTF 16 is 16 bit (2 byte) they are the default for most browsers. UTF-8 is a good encoding scheme when your documents are primarily in the english language (UTF-8 encodes the english language characters using an 8-bit byte but uses 2 or 3 even 4 bytes for each character of other languages). UTF-16 supports all languages of the world but uses 2 byte for each character so irrespective of language you get the document of the same size (relatively speaking). You can set them in the header when sending data to client. You might have to check the specification but mostly all browsers in use support unicode.
I agree. Here's the link:
subject: UTF-8, Unicode
It's not a secret anymore!