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: file to uri to file madness




On 25 Aug 2006, at 09:26, Jerry wrote:


On 25 Aug 2006, at 00:12, Larry Nussbaum wrote:

Thanks for the link & code sample - I'll give it a whirl this weekend when I have a moment to analyze and test properly.

Here's another code sample, this time in C. It shows that the same problem occurs with fopen

Well that's weird. When I converted the code from Java to C I forgot that filenames should be in UTF-8 for fopen. The UTF-8 code exhibits the same behaviour, but it's interesting that the original code worked at all. Here's the correct version:

// Composed
    testFile("\xc3\xa9.html");
    testFile("\xc3\xa9\xc3\xa9.html");
    testFile("\xc3\xa9\xc3\xa9\xc3\xa9.html");

    

    // Deomposed
    testFile("\x65\xcc\x81.html");
    testFile("\x65\xcc\x81\x65\xcc\x81.html");
    testFile("\x65\xcc\x81\x65\xcc\x81\x65\xcc\x81.html");

Jerry

 _______________________________________________
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: file to uri to file madness (From: François-Paul Servant <email@hidden>)
 >Re: file to uri to file madness (From: Jerry <email@hidden>)
 >Re: file to uri to file madness (From: Larry Nussbaum <email@hidden>)
 >Re: file to uri to file madness (From: Larry Nussbaum <email@hidden>)
 >Re: file to uri to file madness (From: Jerry <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.