UTF8 from web conten .xml file to NSString
- by mongeta
Hello,
I can't find a way to convert some UTF8 encoding into NSString.
I get some data from a URL, it's a .xml file and here is their content:
<?xml version="1.0" encoding="UTF-8"?>
<person>
<name>Jim Fernández</name>
<phone>555-1234</phone>
</person>
How I can convert the á into a á ?
some code that doesn't work:
NSString* newStr = [[NSString alloc] initWithData:[NSData dataWithContentsOfURL:URL] encoding:NSUTF8StringEncoding];