1

in xml data is

<content_special>
    SAT 17TH TEST test club cheap drinks £3 shots £5 bottles $beers
</content_special>

i get this string using this code

TBXMLElement *Content_Special=[TBXML childElementNamed:@"content_special" parentElement:Club];
            NSString *Content_SpecialStr = [TBXML textForElement:Content_Special];

when i NSLog(@"Content_special:%@",Content_SpecialStr);

that print like this

 Content_special:SAT 17TH TEST&#13;
test club&#13;
cheap drinks&#13;
&#13;
&#163;3 shots&#13;
&#163;5 bottles&#13;
&#13;
$beers

how can i get original sting which Display in Xlm ? Any suggestion...

Chirag Dj
  • 630
  • 2
  • 9
  • 27
  • It says in your title that you can't use NSUTF8StringEncoding... why? Using UTF8 or less preferably, Unicode, would be the solution as ASCII doesn't contain the euro character.... – Eliza Wilson Aug 31 '13 at 14:16
  • 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]; – Chirag Dj Sep 09 '13 at 06:32
  • You can post it as an answer if thats the solution, even though its your own answer :) – Eliza Wilson Oct 02 '13 at 21:47

2 Answers2

3

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];

Chirag Dj
  • 630
  • 2
  • 9
  • 27
0

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

coneybeare
  • 33,113
  • 21
  • 131
  • 183