代码改变世界

xcode打印的汉字是什么编码

2017-10-25 11:34  dengchaojie_learner  阅读(678)  评论(0编辑  收藏  举报

 

 

xcode打印中文的编码是Unicode。

例如:

Unicode:\U6ca1\U6709\U67e5\U8be2\U5230\U5bf9\U5e94\U7684\U7248\U672c\U4fe1\U606f!

对应的中文:

中文简体(GB 2312):没有查询到对应的版本信息!

 

An NSString object encodes a Unicode-compliant text string, represented as a sequence of UTF–16 code units. All lengths, character indexes, and ranges are expressed in terms of 16-bit platform-endian values, with index values starting at 0.

 

description
A string that represents the contents of the dictionary, formatted as a property list (read-only)

 

Though the property list format uses ASCII for strings, note that Cocoa uses Unicode. Since string encodings vary from region to region, this representation makes the format fragile. You may see strings containing unreadable sequences of ASCII characters; these are used to represent Unicode characters.


 

http://www.jianshu.com/p/f14b4cb1435b

 

转换工具http://tool.chinaz.com/tools/unicode.aspx