tags:

views:

66

answers:

1

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&#225;ndez</name>
<phone>555-1234</phone>
</person>

How can I convert the & #225; into a á ?

some code that doesn't work:

 NSString* newStr = [[NSString alloc] initWithData:[NSData dataWithContentsOfURL:URL] encoding:NSUTF8StringEncoding];

edit:

I'm using the TBXML library

A: 

Hi,

Finally I'm using the NSString+XMLEntities from Michael Waterfall to decode .xml

mongeta