My app receives some data from server which is in XML format and some tags contains Japanese words. When I tried to execute the link in the browser, it gets the correct response in Japanese. For example:
<root>
<categorylist>
<cid>19</cid>
<cname>ファミリー</cname>
<lang>jap</lang>
</categorylist>
</root>
..but in my app, the response string is in some encoded format like the following:
<root>
<categorylist>
<cid>19</cid>
<cname>ファミリー</cname>
<lang>jap</lang>
</categorylist>
</root>
My code to receive XML from the server is:
NSString *req=@"http://www.myserver.com/category.php?lang=jap";
NSString *resultString=[NSString stringWithContentsOfURL:[NSURL URLWithString:req] encoding:NSUTF8StringEncoding error:nil];
Is there a problem with my code? How can I convert the response to correct Japanese strings?