Are you imagining that UTF-16 only supports 16 bits worth (65536 max) of characters? If so, that is incorrect.
In a similar way to UTF-8, the thousands of additional characters are handled by escape codes, which introduce additional 16-bit words, to describe the extended characters. I forget exactly how it works, but go look at www.unicode.org.
In Java, one does sometimes have to take care, because some character-related methods report the number of 16-bit Java chars, rather than the number of Unicode characters. Again, I forget exactly how, but go look at the Java String API in detail.
Some code (particularly if it is old) might have trouble in some locales, if it assumes that the number of Java chars is the number of characters.
To be more precise, the question should be : how do large scale apps use web servers and yet support UTF-8. Web servers : apache,web-logic,tomcat,jboos,ias etc. Thank you
Java supports many encodings, UTF-8 and ISO-8859 amongst them. If a program (web browser, database, ...) needs to get text in other encodings out of Java code, that's no problem at all. UTF-16 just happens to be the one in which strings are stored internally. (Come to think of it, I've never seen a web page served in UTF-16, or a database set up to use UTF-16, so if Java couldn't handle other encoding, that would be a major limitation.)
Originally posted by Sharon whipple: Java is unable to handle UTF-8,
As already said above, that's not true. Just because Java stores characters in UTF-16 internally does not mean that Java is unable to handle UTF-8. The supported encodings page gives a list of character encodings that Java supports.