码迷,mamicode.com
首页 > Web开发 > 详细

URL编码格式

时间:2015-08-27 13:21:27      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:url

- (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

URL编码格式

标签:url

原文地址:http://blog.csdn.net/tubiebutu/article/details/48026109

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!