UIwebview 链接中有中文,解决方法

- (NSString *)encodeToPercentEscapeString: (NSString *) input

{

NSString *outputStr = (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes(

NULL, /* allocator */

(__bridge CFStringRef)input,

NULL, /* charactersToLeaveUnescaped */

(CFStringRef)@"!*'();:@&=+$,/?%#[]",kCFStringEncodingUTF8);

return

outputStr;

}

你可能感兴趣的:(UIwebview 链接中有中文,解决方法)