NSString *name = @"联通测试";
NSString *utfName = [name stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
NSString *tempName = [utfName stringByRemovingPercentEncoding];
打印:utf:%E8%81%94%E9%80%9A%E6%B5%8B%E8%AF%95 temp:联通测试
网友评论