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: Umlauts in file / path names



Daniel Mischler wrote:
| How can I handle file names and path names with Java (Cocoa) that 
| contain umlauts?

What do you mean "handle"? What problem are you trying to solve, what are you doing now, what do you expect to happen, and what's actually happening?


| I need to work with all mounted volumes and it shouldn't choke on 
| special characters.

What does it do when it "chokes"?


| So far I just get 'a?' instead 'รค' if I use it from e.g. new 
| File("/Volumes").listFiles();.

That "a?" probably *is* the a-plus-umlaut, in UTF8. (You'd have to print out the hex values to be sure.) Unix, on which OS X is (ultimately) based, uses eight-bit-wide characters for its filenames. That couldn't be changed with the arrival of Unicode--too many programs assumed those eight-bit characters--so the file system uses UTF-8 (an eight-bit encoding of Unicode) instead.

If you absolutely *must* have it in Unicode, you'll have to convert the UTF-8 to Unicode. Whether you *will* need Unicode depends on what you're doing.

Glen Fisher


 _______________________________________________
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: 
 >Umlauts in file / path names (From: Daniel Mischler <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.