i have a uiwebview. when i read string (from ) from this uiwebview i encodes come charac开发者_如何学运维ters like #. how can i decode?
for example it gives %23test instead of #test. i need #test
thanks.
You can use the stringByReplacingPercentEscapesUsingEncoding: method of NSString:
NSString *encoded = @"%23test";
NSString *decoded = [encoded stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
精彩评论