我正在使用以下代码发出请求:
Alamofire.request(.GET, url).responseJSON { (response) in
switch response.result{
case .Success(let JSON):
print (JSON as! NSDictionary)
响应是:
{
guardado = {
email = "xxxxgopy@hotmail.com";
id = 9552;
name = "luz stella gonz\U00c3\U00a1lez";
pwd = "*******";
};
}
如何处理unicode字符\ U00c3 \ U00a1。
当我尝试从name key
中String var
分配值时,我得到了这个: luzstellagonzález 。但它可能是 luzstellagonzález
答案 0 :(得分:0)
let dictonary = ["email":"xxxxgopy@hotmail.com","id":9552,"pwd" :"*******","name":"luz stella gonz\u{00E1}lez"]
print(dictonary)
/* {
email = "xxxxgopy@hotmail.com";
id = 9552;
name = "luz stella gonzález";
pwd = "*******";
}*/
编码错误......
答案 1 :(得分:0)