IronPython在字符串中定义utf16字符

2024-10-04 01:36:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用数字来定义utf-16(LE)字符。 An example is 'LINEAR B SYLLABLE B028 I'.

当我用u'\U00010001'转义此字符时,我收到u'\u0001'。 真的吗

>>> u'\U00010001' == u'\u0001'
True
如果_我_使用_unichr_ ( ) _也_会_出错_ :_ ^{pr2}$

如何在Python应用程序中定义utf-16字符?在

IronPython 2.7版


Tags: leantrue定义isexample数字字符