2017-12-04 29 views
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 

すべてのユニコードを上記の文字列から文字列に変換したいと思います。ユニコードから文字列への変換迅速

+0

'' üは、いわゆる「HTMLエンティティ」 –

答えて

0

私たちは、私たちのプロジェクトでは、以下の方法があります。

- (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; 
} 
+0

OK私はこれを試してみましょうです –

関連する問題