| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Nov 4, 2009, at 4:16 PM, Greg Guerin wrote:
While I can't see the full implementation of exists(), I can see that it eventually passes the File object into native code in UnixFileSystem. I also know that the file system represents file names in UTF-8. NSFileManager's fileSystemRepresentation effectively does this for you, but calling that via JNI (or, in my case, Eclipse SWT's OS layer) gave me the same results as calling String.getBytes("UTF-8"), so something else is going on.
<rant> That's what makes this so aggravating. The fact that the path is a Java String, complete with UTF-16 encoding, certainly is complicating matters. If I want to display the filename to the user or do something other than file I/O, yes, I probably need to convert the file name to some other encoding. But for ACTUALLY WORKING WITH A FILE I should neither need to know or care what the encoding is. Like Python does....</rant>
I'll post the results here, because this seems like a common-enough problem that someone else would encounter. -- Scott ---------- Scott Kovatch Flex Engineering I am Scott Kovatch, and I approve this message. |
_______________________________________________ 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: | |
| >Re: Problems with File.exists() and surrogate pairs in filename (From: Greg Guerin <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.