I want to decode my string. I have used parsing and get a string from RSS feed. In a string these special characters are not allowed &,<,> in my app. In server side encoding those characters and give it to the string. So now i got the string like,
Actual String : <Tom&Jerry> (only these characters are not allowed in node data & < >).
After Encoding: %3CTom%26Jerry%3E.
But i need to display the string is
<Tom&Jerry>
So how can i decode the string.
Please help me out.
Thanks.
So first, write the very first character of the encoded string and remove it from the encoded string then start adding the first character of the encoded string first to the left and then to the right of the decoded string and do this task repeatedly till the encoded string becomes empty.
Decoding is translating the message from its sign format into meaning. It means converting a message into thoughts by translating the received stimuli into an interpreted meaning in order to understand the message communicated.
Use the -stringByReplacingPercentEscapesUsingEncoding:
method.
[@"%3CTom%26Jerry%3E"
stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With