开发者

decode uiwebview string

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜