I am receiving a nsstring that is not properly encoded like “mystring%201, where must be “mystring 1”. How could I replace all characters that could be interpreted as UTF8? I read a lot of posts but not a full solution. Please note that nsstring is already encoded wrong and I am not asking about how to encode char sequence. Thank you.
I am receiving a nsstring that is not properly encoded like mystring%201, where must
Share
- (NSString *)stringByReplacingPercentEscapesUsingEncoding:(NSStringEncoding)encodingis what you want. basically use it like so: