//直接訪問此url會訪問失敗
//原因 摻雜中文uincode 20180813150735_\U5de5\U7a0b\U5e08\U5934\U50cf.png
NSString *str = @"http://xxxxxx.com/uploads/image/20180813/20180813150735_\U5de5\U7a0b\U5e08\U5934\U50cf.png";
//使用stringByAddingPercentEncodingWithAllowedCharacters處理
NSString *headImgURL = [str stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSLog(@"%@",headImgURL);//http://xxxxxx.com/uploads/image/20180813/20180813150735_%E5%B7%A5%E7%A8%8B%E5%B8%88%E5%A4%B4%E5%83%8F.png
參考文章
http://www.reibang.com/p/21a21866e379
https://nshipster.cn/nscharacterset/