@@ -1835,13 +1835,19 @@ msgid ""
18351835"well as ones which get mapped to ``None``, ``0xFFFE`` or ``'\\ ufffe'``, are "
18361836"treated as undefined mappings and cause an error."
18371837msgstr ""
1838+ "如果 *mapping* 为 ``NULL``,则将应用 Latin-1 编码格式。 否则 *mapping* 必须为字节码位值(0 至 255 "
1839+ "范围内的整数)到 Unicode 字符串的映射、整数(将被解读为 Unicode 码位)或 ``None``。 未映射的数据字节 -- 这样的数据将导致"
1840+ " :exc:`LookupError`,以及被映射到 ``None`` 的数据,``0xFFFE`` 或 "
1841+ "``'\\ ufffe'``,将被视为未定义的映射并导致报错。"
18381842
18391843#: ../../c-api/unicode.rst:1485
18401844msgid ""
18411845"Encode a Unicode object using the given *mapping* object and return the "
18421846"result as a bytes object. Error handling is \" strict\" . Return ``NULL`` if"
18431847" an exception was raised by the codec."
18441848msgstr ""
1849+ "使用给定的 *mapping* 对象编码 Unicode 对象并将结果作为字节串对象返回。 错误处理方式为 \" strict\" 。 "
1850+ "如果编解码器引发了异常则将返回 ``NULL``。"
18451851
18461852#: ../../c-api/unicode.rst:1489
18471853msgid ""
@@ -1850,6 +1856,8 @@ msgid ""
18501856"ordinals (ones which cause a :exc:`LookupError`) as well as mapped to "
18511857"``None`` are treated as \" undefined mapping\" and cause an error."
18521858msgstr ""
1859+ "*mapping* 对象必须将整数 Unicode 码位映射到字节串对象、0 至 255 范围内的整数或 ``None``。 未映射的字符码位(将导致 "
1860+ ":exc:`LookupError` 的数据)以及映射到 ``None`` 的数据将被视为“未定义的映射”并导致报错。"
18531861
18541862#: ../../c-api/unicode.rst:1498
18551863msgid ""
@@ -1866,20 +1874,20 @@ msgstr ""
18661874
18671875#: ../../c-api/unicode.rst:1508
18681876msgid "The following codec API is special in that maps Unicode to Unicode."
1869- msgstr ""
1877+ msgstr "以下特殊的编解码器 API 会将 Unicode 映射至 Unicode。 "
18701878
18711879#: ../../c-api/unicode.rst:1512
18721880msgid ""
18731881"Translate a string by applying a character mapping table to it and return "
18741882"the resulting Unicode object. Return ``NULL`` if an exception was raised by "
18751883"the codec."
1876- msgstr ""
1884+ msgstr "通过应用字符映射表来转写字符串并返回结果 Unicode 对象。 如果编解码器引发了异常则返回 ``NULL``。 "
18771885
18781886#: ../../c-api/unicode.rst:1516
18791887msgid ""
18801888"The mapping table must map Unicode ordinal integers to Unicode ordinal "
18811889"integers or ``None`` (causing deletion of the character)."
1882- msgstr ""
1890+ msgstr "字符映射表必须将整数 Unicode 码位映射到整数 Unicode 码位或 ``None`` (这将删除相应的字符)。 "
18831891
18841892#: ../../c-api/unicode.rst:1519
18851893msgid ""
@@ -1892,7 +1900,7 @@ msgstr ""
18921900msgid ""
18931901"*errors* has the usual meaning for codecs. It may be ``NULL`` which "
18941902"indicates to use the default error handling."
1895- msgstr ""
1903+ msgstr "*errors* 具有用于编解码器的通常含义。 它可以为 ``NULL`` 表示使用默认的错误处理方式。 "
18961904
18971905#: ../../c-api/unicode.rst:1530
18981906msgid ""
@@ -1910,7 +1918,7 @@ msgstr ""
19101918
19111919#: ../../c-api/unicode.rst:1541
19121920msgid "MBCS codecs for Windows"
1913- msgstr ""
1921+ msgstr "Windows 下的 MBCS 编解码器 "
19141922
19151923#: ../../c-api/unicode.rst:1543
19161924msgid ""
@@ -1919,6 +1927,8 @@ msgid ""
19191927"MBCS (or DBCS) is a class of encodings, not just one. The target encoding "
19201928"is defined by the user settings on the machine running the codec."
19211929msgstr ""
1930+ "以下是 MBCS 编解码器的 API。 目前它们仅在 Windows 中可用并使用 Win32 MBCS 转换器来实现转换。 请注意 MBCS(或 "
1931+ "DBCS)是一类编码格式,而非只有一个。 目标编码格式是由运行编解码器的机器上的用户设置定义的。"
19221932
19231933#: ../../c-api/unicode.rst:1550
19241934msgid ""
0 commit comments