我正在调用网络服务并接收带有葡萄牙语字符的数据
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[请求 addValue:@"application/json; charset=ISO-8859-1" forHTTPHeaderField:@"Content-Type"]; NSDictionary *allDataDictionary = [NSJSONSerialization JSONObjectWithData:webData 选项:NSISOLatin1StringEncoding0 错误: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 选项,但没有做任何人知道解决方案的事情,四处搜索没有找到太多帮助,谢谢。