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: Problem with umlauts in file names




On 28-Oct-05, at 3:57 AM, Freek Dijkstra wrote:

Thomas Singer wrote:


new File("/dir/testäöü.txt").createNewFile();
The umlauts map to following bytes: ä=0xE4, ö=0xF6, ü=0xFC.
Now I read the directory content with
String[] fileNames = new File("/dir").list();
The curious thing is, that now the file name looks similar, but has a different byte representation: ä=0x61 0x308, ö=0x6F 0x308, ü=0x75 0x308.



I'm no expert here, but it surely has to do with the encoding used.
Either it is a matter of macroman versus Unicode (the later probably with UTF-16 encoding, though I'm not sure there).

I think it is both unicode.


Or it is a matter of accent encoding: does it represent ä as "ä" or as "a" + "¨"? Given that a is 0x61, I take a bet that 0x308 represents "¨".

That's it. The OS seems to always store files with the accents decomposed.


Scott _______________________________________________
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: 
 >Problem with umlauts in file names (From: Thomas Singer <email@hidden>)
 >Re: Problem with umlauts in file names (From: Freek Dijkstra <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.