• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: encoding of file names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: encoding of file names


  • Subject: Re: encoding of file names
  • From: Aki Inoue <email@hidden>
  • Date: Mon, 23 May 2011 22:00:51 -0700

-[NSString compare:] and its variants can handle the normalization properly.

Aki Inoue


On 2011/05/23, at 21:41, Howard Siegel <email@hidden> wrote:

> Look at NSString's decomposedStringWithCanonicalMapping and
> decomposedStringWithCompatibilityMapping methods.  They'll map
> Unicode strings to normalized forms that you can then use and
> compare.
>
> - h
>
> On Mon, May 23, 2011 at 21:22, Chris Idou <email@hidden> wrote:
>
>>
>>
>> If I take a string from an NSTextField with an accented character: café and
>> I
>> make this into a file name and write a file, then I read that file name
>> back in
>> (using NSFileManager contentsOfDirectoryAtPath), then the string read back
>> in,
>> still looks the same: an accented café, but the strings don't compare
>> anymore.
>> The one in the text field was unichars: 99,97,102,233 and the one in the
>> file
>> name is now    99,97,102,101,769.
>>
>> What does it mean, and how can I make sure I get them both the same and
>> comparable?
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >encoding of file names (From: Chris Idou <email@hidden>)
 >Re: encoding of file names (From: Howard Siegel <email@hidden>)

  • Prev by Date: Re: encoding of file names
  • Next by Date: Re: Getting a handle on CoreAnimation and MVC
  • Previous by thread: Re: encoding of file names
  • Next by thread: Re: encoding of file names
  • Index(es):
    • Date
    • Thread