Home > Mobile >  Url decoding failure in Chinese
Url decoding failure in Chinese

Time:05-13

StringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding
New method stringByAddingPercentEncodingWithAllowedCharacters: [NSCharacterSet URLQueryAllowedCharacterSet]

Transformation: % E8 A5 E5%93% % 83% % 96% E4 E8 A9 BF % % % % 82% 89% E8 % % 9 f % B9 E7 B2 % % 85% EF E5 BC E5%95% % 88% % 86% % % 9 f 8 EF e % % % 89 BC
Abandoned method new method failed, why?

CodePudding user response:

This article https://www.jianshu.com/p/dbb15f019127 for reference

CodePudding user response:

Tried CFURLCreateStringByAddingPercentEscapes and not

CodePudding user response:

Do you want the string with percent reduction? Should use the method of o, by Adding certain wrong ah,
Is stringByRemovingPercentEncoding stringByReplacingPercentEscapesUsingEncoding: the new method
  •  Tags:  
  • iOS
  • Related