假设我MUSICAL SYMBOL G CLEF在Objective-C源文件中的字符串文字中有符号:****.
OS X字符查看器表示CLEF 在其术语中是UTF8 F0 9D 84 9E和Unicode 1D11E(D834+DD1E).
经过一些困难,并使用ICU UNICODE演示页面,我确实得到以下代码:
NSString *uni=@"\U0001d11e";
NSString *uni2=[[NSString alloc] initWithUTF8String:"\xF0\x9D\x84\x9E"];
NSString *uni3=@"";
NSLog(@"unicode: %@ and %@ and %@",uni, uni2, uni3);
Run Code Online (Sandbox Code Playgroud)
我的问题:
@"\U0001d11eUTF-32吗?