标签:set nta pat password encode code utf-8 pass with
iOS编码
[@"带表情的字符串" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLPathAllowedCharacterSet]];
URLFragmentAllowedCharacterSet "#%<>[\]^`{|}
URLHostAllowedCharacterSet "#%/<>?@\^`{|}
URLPasswordAllowedCharacterSet "#%/:<>?@[\]^`{|}
URLPathAllowedCharacterSet "#%;<>?[\]^`{|}
URLQueryAllowedCharacterSet "#%<>[\]^`{|}
URLUserAllowedCharacterSet "#%/:<>?@[\]^`
解码
[@"编码过带表情的字符串" stringByRemovingPercentEncoding];
编码
URLEncoder.encode( "带表情的字符串", "UTF-8" );
解码
URLDecoder.decode( "编码过带表情的字符串", "UTF-8" )
标签:set nta pat password encode code utf-8 pass with
原文地址:https://blog.51cto.com/2254359459/2531262