摘要:
有两种方法:一,使用NSString的方法:NSString* string2 = [string1stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];NSString* string1 = [string2stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];二、使用CFStringRef的方法sUrl = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDe 阅读全文