Decode a UTF8 encoded NSString

While programming in iOS sometime we have to hit certain URLs which in turn returns Encoded string.Which we have to decode to get the actual string.

NSString *currentEncodedString =@"%3CTom%26Jerry%3E"; //Received Encoded UTF8 String
NSString *currentDecodedString = [currentEncodedString
stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"My Current Decoded String: %@",currentDecodedString);

Comments

Popular posts from this blog

Scroll UITextField above Keyboard in a UITableView OR UIScrollView in Swift and Objective C

Reverting all Xcode settings to default settings

CGRectIntegral