1

I have this code &#21488, it is actually a Chinese character with HTML escape using this site.

I wanted to change from the mentioned code back to Chinese character in the program. I tried out NSString + HTML Link 1 and Link 2. With the method name stringByDecodingHTMLEntities.

They both return the same result, which is &#21488. The actual Chinese character is "台". Kindly advise any method that I can use to convert it.

*Note: I am not really sure whether the term "HTML escape" is correct. Correct me if I'm wrong.

asked Nov 26, 2015 at 11:43
2
  • 1
    "HTML entity" or "HTML character entity" is the term. But note that there must be a trailing semicolon: 台 otherwise it is not valid and will not be recognized. Commented Nov 26, 2015 at 14:35
  • @MartinR Thank you for the pointer! Actually the link above "NSString + HTML" is working. Just that I did not included ":" into the string. That's why I cant get the result I wanted. Commented Nov 27, 2015 at 3:11

1 Answer 1

1

Both link below is working. It is actually my careless mistake for missing out an character.

https://github.com/Koolistov/NSString-HTML

https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.m

answered Nov 27, 2015 at 3:14
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.