I had not run into this before but I wanted to know if it's possible to store KEYS with special characters in Objective-C / Cocoa Touch
Since one can force a line break in a NSString with \n I wanted to store some values in a plist (and they do need to be the keys). It's just about 20 lines to static data (well, the keys, the values are NSNumbers that get saved to a file) for which I don't want to use sqlite, so it's either a dictionary or a static array that I can save to disk.
Here is the .plist
So when I try to set a value for any key without special characters all is fine. But trying to set for, say, 'Leg Width\n or Height' returns
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key'
being the argument a NSString = @"Leg Width\n or Height"
Any help is appreciated
Best regards david