暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
Unicode 指南.pdf
228
12页
5次
2022-11-02
免费下载
Unicode
3.9.1
Guido van Rossum
and the Python development team
16, 2020
Python Software Foundation
Email: docs@python.org
Contents
1 Unicode 2
1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Python’s Unicode Support 4
2.1 The String Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Converting to Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Unicode Literals in Python Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 Unicode Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.5 Comparing Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6 Unicode Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Reading and Writing Unicode Data 8
3.1 Unicode filenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Tips for Writing Unicode-aware Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 11
12
1.12
Python Unicode Unicode
1
微信搜索公众号 "Python编程时光" ,回复 "pycharm" 获取免安装永久破解的专业版PyCharm
1 页,共 12
1 Unicode
1.1
Python Unicode
Python
Unicode (https://www.unicode.org/)
** ** A B C È Í
1 I
The Unicode standard describes how characters are represented by code points. A code point value is an integer
in the range 0 to 0x10FFFF (about 1.1 million values, the actual number assigned is less than that). In the standard
and in this document, a code point is written using the notation U+265E to mean the character with value 0x265e
(9,822 in decimal).
Unicode
0061 'a'; LATIN SMALL LETTER A
0062 'b'; LATIN SMALL LETTER B
0063 'c'; LATIN SMALL LETTER C
...
007B '{'; LEFT CURLY BRACKET
...
2167 'Ⅷ'; ROMAN NUMERAL EIGHT
2168 'Ⅸ'; ROMAN NUMERAL NINE
...
265E ''; BLACK CHESS KNIGHT
265F ''; BLACK CHESS PAWN
...
1F600 ''; GRINNING FACE
1F609 ''; WINKING FACE
...
U+265E U+265E
** ** A
Python
1.2
Unicode 0 0x10FFFF 1,114,111
** ** ** **
Unicode ** ** ** **
32 CPU 32
Python
P y t h o n
0x50 00 00 00 79 00 00 00 74 00 00 00 68 00 00 00 6f 00 00 00 6e 00 00 00
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
2
微信搜索公众号 "Python编程时光" ,回复 "pycharm" 获取免安装永久破解的专业版PyCharm
2 页,共 12
of 12
免费下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜