| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Daniel Mischler wrote:
>How can I handle file names and path names with Java (Cocoa) that contain
>umlauts?
Handle them as normal Unicode Strings. That's what they are.
>I need to work with all mounted volumes and it shouldn't choke on special
>characters.
What are you doing that's choking now?
>So far I just get 'a?' instead of <small-a-dieresis> if I use it from e.g. new
>File("/Volumes").listFiles();.
The char after the small-a is almost certainly the combining-dieresis
accent. See TN1150 and find "Canonical Decomposition" on that page:
<http://developer.apple.com/technotes/tn/tn1150.html>
Or go directly to the Unicode Decomposition table:
<http://developer.apple.com/technotes/tn/tn1150table.html>
Hard to say what you're really getting if all you're doing with it is
System.out.println().
Depending on what you intend to do with the file-name, you may have to:
a) convert to composed-accent form.
b) convert to UTF-8.
c) all of the above.
d) none of the above.
See also:
<http://lists.apple.com/archives/java-dev/2004/Sep/msg00511.html>
-- GG
_______________________________________________
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
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.