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
精彩评论