Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting ASCII input to UTF-8 for displaying



"Huyler, Christopher M" <email@hidden> wrote:

>Anyway, since all the strings are stored as ASCII, they are sent to the
>GUI over the socket as ASCII. When these dynamic strings are displayed
>in the GUI running on a Mac, the special characters come out garbled
>because the Mac assumes that they are UTF-8.

If you mean the Mac's default "file.encoding" property is UTF-8, I think
that's wrong. AFAIK, the default value of that property is MacRoman, at
least on US, Canadian, Latin American, or Western European machines.

I think the only way you can get the Mac to assume UTF-8 is if you
predefine a different value of "file.encoding", or actually ask for the
UTF-8 encoding, e.g. an InputStreamReader or String constructor
encoding-name. In both cases, though, it's stretching the meaning of the
word "assume", since you have to tell it something other than its default.

Also, you might want to look at what UTF-8 really represents:
<ftp://ftp.isi.edu/in-notes/rfc2279.txt>

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.