iOS解码umlaut&$
我有一个需要解码的示例: @“für” 如何将其解码为NSString,使其看起来像 fūr 我尝试了很多东西,包括iOS解码umlaut&$,ios,nsstring,decode,diacritics,Ios,Nsstring,Decode,Diacritics,我有一个需要解码的示例: @“für” 如何将其解码为NSString,使其看起来像 fūr 我尝试了很多东西,包括 [@"für" stringByDecodingHTMLEntities] > für [@"für" gtm_stringByUnescapingFromHTML] > für 但是没有运气 谢谢 基于vikingosegundo解决方案的更新 NSLog(@"möchte d
[@"für" stringByDecodingHTMLEntities] > für
[@"für" gtm_stringByUnescapingFromHTML] > für
但是没有运气
谢谢
基于vikingosegundo解决方案的更新
NSLog(@"möchte decoded to : > %@", [@"möchte" stringByEncodingHTMLEntities] );
NSLog(@"möchte decoded to: > %@", [@"möchte" stringByDecodingHTMLEntities] );
NSLog(@"für decoded to : > %@", [@"für" stringByEncodingHTMLEntities] );
NSLog(@"für decoded to: > %@", [@"für" stringByDecodingHTMLEntities] );
NSLog(@"möchte decoded:%@", [@"möchte" stringByDecodingHTMLEntitiesComma] );
NSLog(@"für decoded:%@", [@"für" stringByDecodingHTMLEntitiesComma] );
möchte decoded to : > möchte
möchte decoded to: > möchte
für decoded to : > für
für decoded to: > für
möchte decoded:möchte
für decoded:für
注:
stringByEncodingHTMLEntities来自
StringByDecodingHtmlenties逗号来自vikingosegundo的类别。试试看
[@"für" stringByDecodingHTMLEntities];
或
(注意;
)
还可以解决缺少的
代码>太棒了!谢谢将使用您的解决方案更新我的原始答案。
[@"für" gtm_stringByUnescapingFromHTML];