0
Es ist eines der Wahrzeichen 
Bambergs: das Alte Rathaus, auch Insel- oder Brückenrathaus 
genannt, das die frühere Herrschaftsgrenze zwischen der 
bürgerlichen Inselstadt und der

I want to convert all unicode to string from above string.

Nirav Hathi
  • 1,507
  • 3
  • 12
  • 20

1 Answers1

0

We have the following method in our project:

- (NSString *)convertHTMLToUnicode {
    NSArray *theHTMLEntities = @[@"&", @"Ä", /* more stuff */];
    NSArray *theUnicodeEntities = @[@"&", @"Ä", /* more stuff */];

    NSDictionary *theHTMLSource = [NSDictionary dictionaryWithObjects:theUnicodeEntities forKeys:theHTMLEntities];
    NSMutableString *theText = [NSMutableString stringWithString:self];
    for (NSString *theHtml in theHTMLEntities) {
        [theText replaceOccurrencesOfString:theHtml
                             withString:[theHTMLSource valueForKey:theHtml]
                                options:NSLiteralSearch
                                  range:NSMakeRange(0, theText.length)];
    }
    return theText;
}
dasdom
  • 13,975
  • 2
  • 47
  • 58