How to Decode HTML Entities (“ ” and “ £”) from string in xcode

后端 未结 2 478
北恋
北恋 2021-01-25 05:03

in xml data is


    SAT 17TH TEST test club cheap drinks £3 shots £5 bottles $beers

i get this

相关标签:
2条回答
  • 2021-01-25 05:53

    Ensure your data xml file has utf-8 encoding http://www.w3schools.com/xml/xml_encoding.asp

    0 讨论(0)
  • 2021-01-25 06:03

    Found Solution Using Google Toolbox for Mac GTMNSString+HTML.h ,GTMNSString+HTML.m And GTMDefines.h,

    First #import "GTMNSString+HTML.h"

    use like This: Content_SpecialStr = [Content_SpecialStr gtm_stringByUnescapingFromHTML];

    0 讨论(0)
提交回复
热议问题