> From: Christopher Schultz [mailto:[EMAIL PROTECTED]
> Subject: Re: Migrating to tomcat 6 gives formatted currency
> amounts problem
>
> the 'char' data type is /defined/ to be 16-bits wide
> (http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.1).
> Has this changed? When? (And how!?)

A char is still 16 bits, but you can now have 21-bit code points:
http://java.sun.com/javase/6/docs/api/java/lang/Character.html#unicode

These are manipulated via the int type, rather than char.

> I always thought it was weird for Java to use 16-bit Unicode
> internally

Back when Java was being defined, Unicode still was 16-bit, but not in 
widespread use.

> but then use UTF-8 for all serialized strings

Mostly for easy interoperation with existing editors, comm handlers, browsers, 
etc., which were all byte oriented and, at the time, still largely ASCII.  The 
day-one existence of character encoders in Java permitted use in non-ASCII 
environments.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to