I have a SQLite database with spanish provinces names, but I’m not able to decode unicode characters into NSString to be displayed correctly. For example :Guipúzcoa
With this:
self.provincia.text =[[NSString alloc] initWithCString:[[[provinciaArray objectAtIndex:row] objectForKey:@"name"] UTF8String] encoding:NSUTF8StringEncoding];
But I still see unicode characters.
Many thanks
“
ú” is not a “unicode character,” andNSStringhas no reason to display it as anything but what it actually is. After all, it is notNSHTMLYou need to replace all occurences of that with the actual character. You can use
stringByReplacingOccurrencesOfString:withString:to do the actual replacement.