1010# allenjuly7 <[email protected] >, 20191111# Siyuan Xu <[email protected] >, 20191212# ppcfish <[email protected] >, 201913- # 1lin24 <[email protected] >, 20201413# Dai Xu <[email protected] >, 20211514#
1615#, fuzzy
@@ -110,7 +109,7 @@ msgstr ""
110109msgid ""
111110"The Unicode standard contains a lot of tables listing characters and their "
112111"corresponding code points:"
113- msgstr "Unicode 标准包含了许多表格来列出字符和对应的码位 。"
112+ msgstr "Unicode 标准中包含了许多表格,列出了很多字符及其对应的码位 。"
114113
115114#: ../../howto/unicode.rst:71
116115msgid ""
@@ -120,8 +119,8 @@ msgid ""
120119" KNIGHT', '♞'. In informal contexts, this distinction between code points "
121120"and characters will sometimes be forgotten."
122121msgstr ""
123- "严格地说,这些定义暗示了这样的说法是没有意义的 :“这是字符 ``U+265E``”。``U+265E`` 是一个码位,其代表了某特定的字符 —— "
124- "在这一情形下,它代表了字符 “国际象棋黑方骑士(黑马)” ‘♞’。在非正式上下文中,码位和字符的差异有时会被忽略 。"
122+ "严格地说,上述定义暗示了以下说法是没有意义的 :“这是字符 ``U+265E``”。``U+265E`` "
123+ "只是一个码位,代表某个特定的字符;这里它代表了字符 “国际象棋黑骑士” '♞'。在非正式的上下文中,有时会忽略码位和字符的区别 。"
125124
126125#: ../../howto/unicode.rst:78
127126msgid ""
@@ -132,9 +131,9 @@ msgid ""
132131"to worry about glyphs; figuring out the correct glyph to display is "
133132"generally the job of a GUI toolkit or a terminal's font renderer."
134133msgstr ""
135- "一个字符在屏幕上或在纸上被表示为一组图形元素 ,被称为**字形** 。比如,大写字母 A "
136- "的字形,是斜向的两笔和水平的一笔 ,而具体的细节取决于所使用的字体。大部分 Python "
137- "代码不必担心字形,找到应被显示的正确字形一般来说是用户图形界面工具箱或者终端的字体渲染器的工作 。"
134+ "一个字符在屏幕或纸上被表示为一组图形元素 ,被称为 **字形(glyph)** 。比如,大写字母 A "
135+ "的字形,是两笔斜线和一笔横线 ,而具体的细节取决于所使用的字体。大部分 Python 代码不必担心字形,找到正确的显示字形通常是交给 GUI "
136+ "工具包或终端的字体渲染程序来完成 。"
138137
139138#: ../../howto/unicode.rst:87
140139msgid "Encodings"
@@ -150,27 +149,27 @@ msgid ""
150149" **character encoding**, or just an **encoding**."
151150msgstr ""
152151"上一段可以归结为:一个 Unicode 字符串是一系列码位(从 0 到 ``0x10FFFF`` 或者说十进制的 1,114,111 "
153- "的数字)组成的序列。这一序列在内存中需要被表示为一组 **码元**,然后 **码元** 会对应到包含八个二进制位的字节。将 Unicode "
154- "字符串翻译成字节序列的规则被称为 **字符编码**,或者**编码**。"
152+ "的数字)组成的序列。这一序列在内存中需被表示为一组 **码元(code unit)** , **码元** 会映射成包含八个二进制位的字节。将 "
153+ "Unicode 字符串翻译成字节序列的规则称为 **字符编码** ,或者 **编码** 。"
155154
156155#: ../../howto/unicode.rst:97
157156msgid ""
158157"The first encoding you might think of is using 32-bit integers as the code "
159158"unit, and then using the CPU's representation of 32-bit integers. In this "
160159"representation, the string \" Python\" might look like this:"
161160msgstr ""
162- "你可能会想到的第一种编码是使用一个 32 位的整数来代表一个代码位,然后使用 CPU 对 32 位整数的表达方式。在这一表达方式中, 字符串 "
163- "“Python” 可能看起来像是这样 :"
161+ "大家首先会想到的编码可能是用 32 位的整数作为代码位,然后采用 CPU 对 32 位整数的表示法。 字符串 “Python” "
162+ "用这种表示法可能会如下所示 :"
164163
165164#: ../../howto/unicode.rst:107
166165msgid ""
167166"This representation is straightforward but using it presents a number of "
168167"problems."
169- msgstr "这个表达方式非常直接,但同时也存在 一些问题。"
168+ msgstr "这种表示法非常直白,但也存在 一些问题。"
170169
171170#: ../../howto/unicode.rst:110
172171msgid "It's not portable; different processors order the bytes differently."
173- msgstr "不够方便;不同的处理器对字节的排序不同 。"
172+ msgstr "不具可移植性;不同的处理器的字节序不同 。"
174173
175174#: ../../howto/unicode.rst:112
176175msgid ""
@@ -182,17 +181,15 @@ msgid ""
182181"that large), but expanding our usage of disk and network bandwidth by a "
183182"factor of 4 is intolerable."
184183msgstr ""
185- "非常浪费空间。多数编码都小于127,或者255,所以很多空间都是 ``0x00``。上面的字符串takes 24 bytes compared to "
186- "the 6 bytes needed for an ASCII representation. Increased RAM usage doesn't "
187- "matter too much (desktop computers have gigabytes of RAM, and strings aren't"
188- " usually that large), but expanding our usage of disk and network bandwidth "
189- "by a factor of 4 is intolerable."
184+ "非常浪费空间。 在大多数文本中,大部分码位都小于 127 或 255,因此字节 ``0x00`` 占用了大量空间。相较于 ASCII 表示法所需的 6 "
185+ "个字节,以上字符串需要占用 24 个字节。RAM 用量的增加没那么要紧(台式计算机有成 GB 的 "
186+ "RAM,而字符串通常不会有那么大),但要把磁盘和网络带宽的用量增加 4 倍是无法忍受的。"
190187
191188#: ../../howto/unicode.rst:120
192189msgid ""
193190"It's not compatible with existing C functions such as ``strlen()``, so a new"
194191" family of wide string functions would need to be used."
195- msgstr ""
192+ msgstr "与现有的 C 函数(如 ``strlen()`` )不兼容,因此需要采用一套新的宽字符串函数。 "
196193
197194#: ../../howto/unicode.rst:123
198195msgid ""
0 commit comments