How to post string with special character and Thai Language using XML parsing in Objective C?

You can replace your string so that it will allow you to send special character. You can use string method stringByReplacingOccurrencesOfString

 NSString *RaisedBy="Your Special character string";
        RaisedBy = [RaisedBy stringByReplacingOccurrencesOfString:@"&" withString:@"&"];
        RaisedBy = [RaisedBy stringByReplacingOccurrencesOfString:@"<" withString:@"&lt;"];
        RaisedBy = [RaisedBy stringByReplacingOccurrencesOfString:@">" withString:@"&gt;"];
        RaisedBy = [RaisedBy stringByReplacingOccurrencesOfString:@"'" withString:@"&apos;"];
        RaisedBy = [RaisedBy stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]];

This code will also support thai language.

Leave a Comment