i have created a plist with strings. Inside the strings i have umlaute, and can't encode them to be shown correctly. my code looks like this:
NSString *myFile = [[NSBundle mainBundle] pathForResource:@"LevelText" ofType:@"plist"];
strings = [[NSDictionary alloc] initWithContentsOfFile:myFile ];
stringkeys = [strings allKeys];
NSEnumerator *enumerator = [strings objectEnumerator];
while (value = [enumerator nextObject]) {
if(![value isEqualToString:@""]){
NSString *right = [NSString stringWithCString:value.UTF8String encoding: NSUTF8StringEncoding];
NSLog(@"Value: %s", right.UTF8String);
}
}
i get load the plist into a NSDictionary object and then enumerate through it. I also looked at another example on stackoverflow but it doesn't work like that. The Umlaut always is represented like that:
anhören