I'm using an ASP
request returning a XML
file containing some latin characters.
By using this code :
NSData *data = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.my-link.asp"]];
NSString *str = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding];
I read almost every char of the file correctly. Almost, because some of them are replaced by this char : ¿. I'm talking about the bullet (•, 8226)
and the right single quotation mark (’, 8217)
, but I bet I'm going to have some issues with other unusual chars.
My XML
prefix is <?xml version="1.0" encoding="ISO-8859-1"?>
. I wonder if there is a problem with my XML
file or with my code, and how to solve it.