@@ -668,44 +668,53 @@ msgid ""
668668" you supply the :const:`re.ASCII` flag to :func:`~re.compile`, ``\\ d+`` will"
669669" match the substring \" 57\" instead."
670670msgstr ""
671+ "执行时,``\\ d+`` 将匹配上泰语数字并打印出来。如果向 :func:`~re.compile` 提供的是 :const:`re.ASCII` "
672+ "标志,``\\ d+`` 则会匹配子串 \" 57\" 。"
671673
672674#: ../../howto/unicode.rst:507
673675msgid ""
674676"Similarly, ``\\ w`` matches a wide variety of Unicode characters but only "
675677"``[a-zA-Z0-9_]`` in bytes or if :const:`re.ASCII` is supplied, and ``\\ s`` "
676678"will match either Unicode whitespace characters or ``[ \\ t\\ n\\ r\\ f\\ v]``."
677679msgstr ""
680+ "类似地,``\\ w`` 将匹配多种 Unicode 字符,但对于字节串则只会匹配 ``[a-zA-Z0-9_]`` ,如果指定 "
681+ ":const:`re.ASCII`, ``\\ s `` 将匹配 Unicode 空白符或 ``[ \\ t\\ n\\ r\\ f\\ v]``。"
678682
679683#: ../../howto/unicode.rst:518
680684msgid "Some good alternative discussions of Python's Unicode support are:"
681- msgstr ""
685+ msgstr "关于 Python 的 Unicode 支持,其他还有一些很好的讨论: "
682686
683687#: ../../howto/unicode.rst:520
684688msgid ""
685689"`Processing Text Files in Python 3 <http://python-"
686690"notes.curiousefficiency.org/en/latest/python3/text_file_processing.html>`_, "
687691"by Nick Coghlan."
688692msgstr ""
693+ "`用 Python 3 处理文本文件 <http://python-"
694+ "notes.curiousefficiency.org/en/latest/python3/text_file_processing.html>`_ "
695+ ",作者 Nick Coghlan。"
689696
690697#: ../../howto/unicode.rst:521
691698msgid ""
692699"`Pragmatic Unicode <https://nedbatchelder.com/text/unipain.html>`_, a PyCon "
693700"2012 presentation by Ned Batchelder."
694701msgstr ""
702+ "`实用的 Unicode <https://nedbatchelder.com/text/unipain.html>`_,Ned Batchelder "
703+ "在 PyCon 2012 上的演示。"
695704
696705#: ../../howto/unicode.rst:523
697706msgid ""
698707"The :class:`str` type is described in the Python library reference at "
699708":ref:`textseq`."
700- msgstr ""
709+ msgstr ":class:`str` 类型在 Python 库参考文档 :ref:`textseq` 中有介绍。 "
701710
702711#: ../../howto/unicode.rst:526
703712msgid "The documentation for the :mod:`unicodedata` module."
704- msgstr ""
713+ msgstr ":mod:`unicodedata` 模块的文档 "
705714
706715#: ../../howto/unicode.rst:528
707716msgid "The documentation for the :mod:`codecs` module."
708- msgstr ""
717+ msgstr ":mod:`codecs` 模块的文档 "
709718
710719#: ../../howto/unicode.rst:530
711720msgid ""
@@ -715,17 +724,23 @@ msgid ""
715724"Python 2's Unicode features (where the Unicode string type is called "
716725"``unicode`` and literals start with ``u``)."
717726msgstr ""
727+ "Marc-André Lemburg 在 EuroPython 2002 上做了一个题为“Python 和 Unicode”(PDF "
728+ "幻灯片)<https://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>`_ "
729+ "的演示文稿。该幻灯片很好地概括了 Python 2 的 Unicode 功能设计(其中 Unicode 字符串类型称为 ``unicode``,文字以 "
730+ "``u`` 开头)。"
718731
719732#: ../../howto/unicode.rst:538
720733msgid "Reading and Writing Unicode Data"
721- msgstr ""
734+ msgstr "Unicode 数据的读写 "
722735
723736#: ../../howto/unicode.rst:540
724737msgid ""
725738"Once you've written some code that works with Unicode data, the next problem"
726739" is input/output. How do you get Unicode strings into your program, and how"
727740" do you convert Unicode into a form suitable for storage or transmission?"
728741msgstr ""
742+ "既然处理 Unicode 数据的代码写好了,下一个问题就是输入/输出了。如何将 Unicode 字符串读入程序,如何将 Unicode "
743+ "转换为适于存储或传输的形式呢?"
729744
730745#: ../../howto/unicode.rst:544
731746msgid ""
@@ -735,6 +750,8 @@ msgid ""
735750"Unicode data, for example. Many relational databases also support Unicode-"
736751"valued columns and can return Unicode values from an SQL query."
737752msgstr ""
753+ "根据输入源和输出目标的不同,或许什么都不用干;请检查一下应用程序用到的库是否原生支持 Unicode。例如,XML 解析器往往会返回 Unicode "
754+ "数据。许多关系数据库的字段也支持 Unicode 值,并且 SQL 查询也能返回 Unicode 值。"
738755
739756#: ../../howto/unicode.rst:550
740757msgid ""
@@ -744,6 +761,8 @@ msgid ""
744761"bytes with ``bytes.decode(encoding)``. However, the manual approach is not "
745762"recommended."
746763msgstr ""
764+ "在写入磁盘或通过套接字发送之前,Unicode 数据通常要转换为特定的编码。可以自己完成所有工作:打开一个文件,从中读取一个 8 位字节对象,然后用 "
765+ "``bytes.decode(encoding)`` 对字节串进行转换。但是,不推荐采用这种全人工的方案。 "
747766
748767#: ../../howto/unicode.rst:555
749768msgid ""
0 commit comments