UTF-8解码
NSString* str= [@"%E4%B8%AD%E5%9B%BD" stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"str=%@", str);
UTF-8转码
NSString* str = [@"我是中文" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"str=%@", str);
网友评论