• 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: Renaming files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Renaming files?


  • Subject: Re: Renaming files?
  • From: Clark Cox <email@hidden>
  • Date: Wed, 22 Dec 2004 15:04:02 -0500

On Wed, 22 Dec 2004 20:10:02 +0100, Christoffer Lerno <email@hidden> wrote:

> I'm (among other things) using the filename as a dictionary key. Since
> the filenames are byte-wise different, isEqualToString: fails where a
> compare: would succeed, which in turn makes it impossible for me to
> retrieve the dictionary value unless I can make sure the dictionary key
> and the key I use actually do satisfy isEqualToString:

OK, now it makes sense. Just normalize the string before you use it as a key.

That is, replace calls like:

[myDictionary objectForKey: string];
[myDictionary setObject: object forKey: string];

with calls like:

[myDictionary objectForKey: [string decomposedStringWithCanonicalMapping]];
[myDictionary setObject: object forKey: [string
decomposedStringWithCanonicalMapping]];


--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Renaming files?
      • From: Christoffer Lerno <email@hidden>
References: 
 >Renaming files? (From: Christoffer Lerno <email@hidden>)
 >Re: Renaming files? (From: Jeremy Dronfield <email@hidden>)
 >Re: Renaming files? (From: Christoffer Lerno <email@hidden>)
 >Re: Renaming files? (From: Jeremy Dronfield <email@hidden>)
 >Re: Renaming files? (From: Christoffer Lerno <email@hidden>)

  • Prev by Date: Re: Creating black and white image
  • Next by Date: Re: Creating black and white image
  • Previous by thread: Re: Renaming files?
  • Next by thread: Re: Renaming files?
  • Index(es):
    • Date
    • Thread