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: Weird problems with Charset of Files



Hi Sciss,

Mac OS X stores file names as canonically decomposed character sequences (Unicode Normalization Form D).
In a decomposed characters sequence, the character "a umlaut" รค is stored as two unicode code points.
Java usually works with composed Unicode character sequences which stores "a umlaut" in a single code point.


For details see:
http://java.sun.com/javase/6/docs/api/java/text/Normalizer.html

For a lot more details see:
http://developer.apple.com/technotes/tn2002/tn2078.html#HowEncoded
http://developer.apple.com/documentation/MacOSX/Conceptual/ BPInternational/Articles/FileEncodings.html
http://www.unicode.org/reports/tr15/index.html


With J2SE6 you can convert between normalization forms using class java.text.Normalizer.
To do the normalization with earlier Java versions, you can use the Normalizer classes available from the Unicode consortium:
http://www.unicode.org/reports/tr15/Normalizer.html


With best regards,
Werner



On 17.09.2006, at 16:40, Sciss wrote:
i have a problem with pathname strings from File objects. they appear to be in a weird encoding which results in me being unable to transcode them to other charsets and transfer them using OpenSoundControl. the problem arises with characters not in the lower 7 bit of standard ascii, for example umlauts. like the following:

_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Weird problems with Charset of Files (From: Sciss <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.