简体   繁体   中英

Can not decode \\u00e2\\u0080\\u0099 to ’ in iOS

Exact text written on admin panel is Test's, and our PHP server is using utf8_encode() method to encode this text, which results in response on mobile end like :: Test\â\€\™s

How could I decode it back to ' to display on mobile app ? I have tried so many solutions given including utf8 decoding, but it's not working, please help.

I also tried solution given in How to replace the \â\€\™ this string into ' in iOS , but this solution is for only a specific character, and I am looking for some generalize solution, replacement of \â\€\™ with ' seems to be a temporary solution as it don't assure if I get some other unicode in response.

As per the OP...

The problem was with the server encoding, and not on the decoding end.

I'm adding this as an answer so other folks don't have to dig through the comments.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM