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



On Mar 29, 2004, at 4:33 PM, Huyler, Christopher M 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. Any of the static strings
that are compiled into the jar display fine so it is just these strings
that come from the C/C++ backend that are garbled.

I'm confused

I don't think Mac assumes here something special:
it uses default encoding; you have to setup appropriate encoding for java strings
use for example Latin 1-3 encodings for: they are cover codes 0 - 255 interval
(http://www.microsoft.com/globaldev/reference/iso.mspx sorry for MS link :-) )

it's weird that windows/linux behave differently I'd think you should have exactly the same problem
with windows/linux JVM unless they have different default encodings, but you don't have to trust
to default encodings anyway I'd explicitly set encoding for any input streams


Dmitry Markman
_______________________________________________
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.


References: 
 >Converting ASCII input to UTF-8 for displaying (From: "Huyler, Christopher M" <email@hidden>)



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.