开发者

Plus signs in UILabel text

I have an iPhone app that uses core.data as its storage and a rest api (apache jersey based).

it retrieves data, saves it to core.data and then displays the data on the app.

The problem i have is that the spaces are replaced with + signs...

Is this an encoding issue that comes from the 开发者_StackOverflowrest service?


Yes, that string has been URL Encoded. Spaces are replaced with + signs. Non alpha numeric characters are replaced by their ASCII equivalents.

I believe you want to decode it using

- (NSString *)stringByReplacingPercentEscapesUsingEncoding:(NSStringEncoding)encoding
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜