I am creating an application where a user can click a city name in a tableview. I'm identifying the name the user selected to match a key in a NSDictionary.
The problem is that some of the cities are having å ä ö in their name, since the app should work in Sweden.
The NSDictionaries are stored in a plist-file. Looks like this:
{
Göteborg = {
name = "Göteborg";
adress = "xxx";
phone = "xxx";
};
}
How should I make this work? I can think of a few stragies, which I don't know how to implement:
Escape the å ä ö in in the plist file some way. But how?
In the plist, instead of Göteborg I could call the key Goteborg and in the code always exchange the å ä ö to a a o before calling the key in the dictionary. But how do I do that if I'm not going to loop through the string and build up a new one? I assume it's possible in an easy way, e.g. a "change all ö to o" method.
This is the error message I get when trying to compile the application:
English.lproj/factories.plist: Unexpected character { at line 1
Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist failed with exit code 1
Thanks in advance!