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.

IssacZH.
  • 1,457
  • 3
  • 24
  • 54
  • 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. – Martin R Nov 26 '15 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. – IssacZH. Nov 27 '15 at 03:11

1 Answers1

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

IssacZH.
  • 1,457
  • 3
  • 24
  • 54