Note that there are some explanatory texts on larger screens.

plurals
  1. POReceive XML with special characters
    primarykey
    data
    text
    <p>I'm trying to parse XML with characters like <strong>é</strong>, <strong>ñ</strong> I'm using UTF8 as encoding..</p> <p>I have already tried change the encode to <strong>NSISOLatin1StringEncoding</strong> but It doesn't work</p> <p>The code is:</p> <pre><code> -(void)connectionDidFinishLoading:(NSURLConnection *)connection { //NSLog(@"DONE. Received Bytes: %d", [webData length]); NSString *theXML = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; // NSLog(theXML); [theXML release]; if( xmlParser ) { [xmlParser release]; } xmlParser = [[NSXMLParser alloc] initWithData: webData]; [xmlParser setDelegate:self]; [xmlParser setShouldResolveExternalEntities:YES]; [xmlParser parse]; if (connection) { [connection release]; } } -(void)callWS { NSString *url = @"theUrlHere"; NSMutableURLRequest *request =[[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:url]]; [request setHTTPMethod:@"GET"]; NSURLConnection *conn=[[NSURLConnection alloc] initWithRequest:request delegate:self]; if (conn) { webData = [[NSMutableData data] retain]; } </code></pre> <p>When I receive the xml response...The results with special characters appears wrong...</p> <pre><code> - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if(!soapResults) { ....//the soapResults here appears wrong when It has special chars... } </code></pre> <p>Example: <strong>Caperuçú</strong> appears <strong>çú</strong> , <strong>Indianópolis</strong> appears <strong>ópolis</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload