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?
Call
-precomposedStringWithCanonicalMappingon your string before using it.