【发布时间】:2013-01-29 06:58:57
【问题描述】:
我正在调用网络服务并接收带有葡萄牙语字符的数据
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request addValue:@"application/json; charset=ISO-8859-1" forHTTPHeaderField:@"Content-Type"]; NSDictionary *allDataDictionary = [NSJSONSerialization JSONObjectWithData:webData options:NSISOLatin1StringEncoding0 error:nil];
甚至将 iso-8859-1 添加到标题中,但总是收到这样的字典:
{
name = "Lu\U00eds Brito";
user = lbrito;
userId = 16;
},
{
name = "Nelson Azevedo";
user = nazevedo;
userId = 17;
},
{
name = "M\U00f3nica Morais";
user = mmorais;
userId = 19;
},
尝试输入 NSISOLatin1StringEncoding 选项但没有做任何事情 有人知道解决方案,四处搜索没有找到太多帮助,thks。
【问题讨论】: