Take the 2-minute tour ×

I'm writing a file system using MacFUSE, to store content/attributes of directories and files i use dictionaries, since their path is unique. For normal paths there's no problem what so ever, but paths containing "non-standard" letters like "åäö" is not working properly. I've narrowed it down to the unicode format.

Allocating a string with @"ä" gives the unicode 228, but sometimes (not all the times) my code is called from MacFUSE with the "ä" represented as two unicode characters: "a" (unicode:97) followed by "¨" (unicode:776). This causes [dictionary objectForKey:path] to return nil. NSLog prints the path correctly with "ä", but [string isEqualToString:] returns NO.

Is there any good way to fix this? Or would i have to search through and fix every path?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Call -precomposedStringWithCanonicalMapping on your string before using it.

share|improve this answer
seems to work, thank you! –  Henrik Feb 7 '11 at 7:52

Your Answer


