2017-12-04 6 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 

모든 유니 코드를 위의 문자열에서 문자열로 변환하고 싶습니다.unicode to string conversion swift

+0

'ü'확인 날이 시도 할 수 –

답변

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

소위 "HTML 엔티티"입니다 –