- (NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc;
原文解释:
/* Adds all percent escapes necessary to convert the receiver into a legal URL string. Uses the given encoding to determine the correct percent escapes (returning nil if the given encoding cannot encode a particular character). See CFURLCreateStringByAddingPercentEscapes in CFURL.h for more complex transformations
*/
翻译:
添加所有必要逃百分比将接收器转化为一个合法的URL字符串。使用给定的编码来确定正确的百分比逃(返回零如果给定的编码不能编码特定的字符)。看到CFURL CFURLCreateStringByAddingPercentEscapes。对于更复杂的转换
- (NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc;
原文解释:
/* Replaces all percent escapes with the matching characters as determined by the given encoding. Returns nil if the transformation is not possible (i.e. the percent escapes give a byte sequence not legal in the given encoding). See CFURLCreateStringByReplacingPercentEscapes in CFURL.h for more complex transformations
*/
翻译:
替换所有匹配字符的转义百分比由给定的编码。返回零如果转换是不可能的(即百分比逃给一个字节序列在给定的编码不合法)。看到CFURL CFURLCreateStringByReplacingPercentEscapes。对于更复杂的转换
我们拿到后台的URL进行拼接后有时候会发现有些不能编码成功
所有我们要进行处理
还有什么不能明白的可以关注我 然后提处理我们一起coding