Tuesday, April 10, 2012

NSMutableString and (character)-encoding issue: getting \U00fc in case of ü

i am fetching my entity from coreData and saving the result of fetchrequest to an NSMutableString for text to speech.



self.ttsInboxCards = [[NSMutableString alloc] initWithString:@""];  
[self.ttsInboxCards appendString:[[entitySetsCards valueForKey:@"cardTitle"] description]];


And in NSLog i am getting this values:



F\U00fcr | schl\U00e4ge | zuh\U00f6ren  


which should be:



Für | schläge | zuhören  


I have tried a lot of things to get the correct encoding, for example with:



stringWithUTF8String:  


and so on, but nothing worked.



How can i prevent this issue?





No comments:

Post a Comment