Make Merge a3488e5902f5c26e5cc289aec2518e7b5058e5d1 (#729)
* make merge * Update distributing/index.po * Update extending/extending.po * Apply suggestions from code review * powrap
This commit is contained in:
parent ecdbeec7ee
commit 294e8b93c0
68 changed files with 3640 additions and 3581 deletions
| | @ -4,14 +4,14 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2019-03-11 12:59+0100\n" | ||||
"POT-Creation-Date: 2019-05-23 16:48+0200\n" | ||||
"PO-Revision-Date: 2019-04-21 13:08+0200\n" | ||||
"Last-Translator: Jules Lasne <jules.lasne@gmail.com>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
"Language: fr\n" | ||||
"MIME-Version: 1.0\n" | ||||
"Content-Type: text/plain; charset=UTF-8\n" | ||||
"Content-Transfer-Encoding: 8bit\n" | ||||
"Last-Translator: Jules Lasne <jules.lasne@gmail.com>\n" | ||||
"X-Generator: Poedit 2.2.1\n" | ||||
| ||||
#: ../Doc/howto/logging.rst:3 | ||||
| | | |||
209 howto/unicode.po
209
howto/unicode.po | | @ -5,7 +5,7 @@ msgid "" | |||
msgstr "" | ||||
"Project-Id-Version: Python 3.6\n" | ||||
"Report-Msgid-Bugs-To: \n" | ||||
"POT-Creation-Date: 2019-04-10 09:35+0200\n" | ||||
"POT-Creation-Date: 2019-05-23 16:48+0200\n" | ||||
"PO-Revision-Date: 2019-05-11 12:37+0200\n" | ||||
"Last-Translator: Mathieu Dupuy <deronnax@gmail.com>\n" | ||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" | ||||
| | @ -274,11 +274,13 @@ msgid "It can handle any Unicode code point." | |||
msgstr "Il peut gérer n'importe quel point de code Unicode." | ||||
| ||||
#: ../Doc/howto/unicode.rst:138 | ||||
#, fuzzy | ||||
msgid "" | ||||
"A Unicode string is turned into a sequence of bytes containing no embedded " | ||||
"zero bytes. This avoids byte-ordering issues, and means UTF-8 strings can " | ||||
"be processed by C functions such as ``strcpy()`` and sent through protocols " | ||||
"that can't handle zero bytes." | ||||
"A Unicode string is turned into a sequence of bytes that contains embedded " | ||||
"zero bytes only where they represent the null character (U+0000). This means " | ||||
"that UTF-8 strings can be processed by C functions such as ``strcpy()`` and " | ||||
"sent through protocols that can't handle zero bytes for anything other than " | ||||
"end-of-string markers." | ||||
msgstr "" | ||||
"Une chaîne Unicode est transformée en une séquence d'octets ne contenant " | ||||
"aucun octet *zéro*. Cela évite les problèmes d'*endianness* et signifie que " | ||||
| | @ -286,11 +288,11 @@ msgstr "" | |||
"``strcpy()`` et envoyées via des protocoles qui ne peuvent pas gérer les " | ||||
"octets *zéro*." | ||||
| ||||
#: ../Doc/howto/unicode.rst:142 | ||||
#: ../Doc/howto/unicode.rst:143 | ||||
msgid "A string of ASCII text is also valid UTF-8 text." | ||||
msgstr "Une chaîne de texte ASCII est également un texte UTF-8 valide." | ||||
| ||||
#: ../Doc/howto/unicode.rst:143 | ||||
#: ../Doc/howto/unicode.rst:144 | ||||
msgid "" | ||||
"UTF-8 is fairly compact; the majority of commonly used characters can be " | ||||
"represented with one or two bytes." | ||||
| | @ -298,7 +300,7 @@ msgstr "" | |||
"UTF-8 est assez compact. La majorité des caractères couramment utilisés " | ||||
"peuvent être représentés avec un ou deux octets." | ||||
| ||||
#: ../Doc/howto/unicode.rst:145 | ||||
#: ../Doc/howto/unicode.rst:146 | ||||
msgid "" | ||||
"If bytes are corrupted or lost, it's possible to determine the start of the " | ||||
"next UTF-8-encoded code point and resynchronize. It's also unlikely that " | ||||
| | @ -309,12 +311,21 @@ msgstr "" | |||
"est également improbable que des données 8-bits aléatoires ressemblent à du " | ||||
"UTF-8 valide." | ||||
| ||||
#: ../Doc/howto/unicode.rst:152 ../Doc/howto/unicode.rst:508 | ||||
#: ../Doc/howto/unicode.rst:729 | ||||
#: ../Doc/howto/unicode.rst:149 | ||||
msgid "" | ||||
"UTF-8 is a byte oriented encoding. The encoding specifies that each " | ||||
"character is represented by a specific sequence of one or more bytes. This " | ||||
"avoids the byte-ordering issues that can occur with integer and word " | ||||
"oriented encodings, like UTF-16 and UTF-32, where the sequence of bytes " | ||||
"varies depending on the hardware on which the string was encoded." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:157 ../Doc/howto/unicode.rst:513 | ||||
#: ../Doc/howto/unicode.rst:734 | ||||
msgid "References" | ||||
msgstr "Références" | ||||
| ||||
#: ../Doc/howto/unicode.rst:154 | ||||
#: ../Doc/howto/unicode.rst:159 | ||||
msgid "" | ||||
"The `Unicode Consortium site <http://www.unicode.org>`_ has character " | ||||
"charts, a glossary, and PDF versions of the Unicode specification. Be " | ||||
| | @ -328,7 +339,7 @@ msgstr "" | |||
"`chronologie <http://www.unicode.org/history/>`_ de l’origine et du " | ||||
"développement de l’Unicode est également disponible sur le site." | ||||
| ||||
#: ../Doc/howto/unicode.rst:159 | ||||
#: ../Doc/howto/unicode.rst:164 | ||||
msgid "" | ||||
"On the Computerphile Youtube channel, Tom Scott briefly `discusses the " | ||||
"history of Unicode and UTF-8 <https://www.youtube.com/watch?v=MijmeoH9LT4>` " | ||||
| | @ -339,7 +350,7 @@ msgstr "" | |||
"Unicode Miracle <https://www.youtube.com/watch?v=MijmeoH9LT4>` (9 minutes et " | ||||
"36 secondes)." | ||||
| ||||
#: ../Doc/howto/unicode.rst:163 | ||||
#: ../Doc/howto/unicode.rst:168 | ||||
msgid "" | ||||
"To help understand the standard, Jukka Korpela has written `an introductory " | ||||
"guide <http://jkorpela.fi/unicode/guide.html>`_ to reading the Unicode " | ||||
| | @ -349,7 +360,7 @@ msgstr "" | |||
"d’introduction <http://jkorpela.fi/unicode/guide.html>`_ à la lecture des " | ||||
"tables de caractères Unicode (ressource en anglais)." | ||||
| ||||
#: ../Doc/howto/unicode.rst:167 | ||||
#: ../Doc/howto/unicode.rst:172 | ||||
msgid "" | ||||
"Another `good introductory article <https://www.joelonsoftware." | ||||
"com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-" | ||||
| | @ -364,7 +375,7 @@ msgstr "" | |||
"clarifié les choses, vous devriez essayer de lire cet article là avant de " | ||||
"continuer." | ||||
| ||||
#: ../Doc/howto/unicode.rst:172 | ||||
#: ../Doc/howto/unicode.rst:177 | ||||
msgid "" | ||||
"Wikipedia entries are often helpful; see the entries for \"`character " | ||||
"encoding <https://en.wikipedia.org/wiki/Character_encoding>`_\" and `UTF-8 " | ||||
| | @ -374,21 +385,21 @@ msgstr "" | |||
"caractères <https://fr.wikipedia.org/wiki/Codage_des_caract%C3%A8res>`_\" et " | ||||
"`UTF-8 <https://fr.wikipedia.org/wiki/UTF-8>`_, par exemple." | ||||
| ||||
#: ../Doc/howto/unicode.rst:178 | ||||
#: ../Doc/howto/unicode.rst:183 | ||||
msgid "Python's Unicode Support" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:180 | ||||
#: ../Doc/howto/unicode.rst:185 | ||||
msgid "" | ||||
"Now that you've learned the rudiments of Unicode, we can look at Python's " | ||||
"Unicode features." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:184 | ||||
#: ../Doc/howto/unicode.rst:189 | ||||
msgid "The String Type" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:186 | ||||
#: ../Doc/howto/unicode.rst:191 | ||||
msgid "" | ||||
"Since Python 3.0, the language's :class:`str` type contains Unicode " | ||||
"characters, meaning any string created using ``\"unicode rocks!\"``, " | ||||
| | @ -396,18 +407,18 @@ msgid "" | |||
"Unicode." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:190 | ||||
#: ../Doc/howto/unicode.rst:195 | ||||
msgid "" | ||||
"The default encoding for Python source code is UTF-8, so you can simply " | ||||
"include a Unicode character in a string literal::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:200 | ||||
#: ../Doc/howto/unicode.rst:205 | ||||
msgid "" | ||||
"Side note: Python 3 also supports using Unicode characters in identifiers::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:206 | ||||
#: ../Doc/howto/unicode.rst:211 | ||||
msgid "" | ||||
"If you can't enter a particular character in your editor or want to keep the " | ||||
"source code ASCII-only for some reason, you can also use escape sequences in " | ||||
| | @ -415,14 +426,14 @@ msgid "" | |||
"delta glyph instead of a \\u escape.) ::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:218 | ||||
#: ../Doc/howto/unicode.rst:223 | ||||
msgid "" | ||||
"In addition, one can create a string using the :func:`~bytes.decode` method " | ||||
"of :class:`bytes`. This method takes an *encoding* argument, such as " | ||||
"``UTF-8``, and optionally an *errors* argument." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:222 | ||||
#: ../Doc/howto/unicode.rst:227 | ||||
msgid "" | ||||
"The *errors* argument specifies the response when the input string can't be " | ||||
"converted according to the encoding's rules. Legal values for this argument " | ||||
| | @ -433,7 +444,7 @@ msgid "" | |||
"examples show the differences::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:242 | ||||
#: ../Doc/howto/unicode.rst:247 | ||||
msgid "" | ||||
"Encodings are specified as strings containing the encoding's name. Python " | ||||
"comes with roughly 100 different encodings; see the Python Library Reference " | ||||
| | @ -442,7 +453,7 @@ msgid "" | |||
"synonyms for the same encoding." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:248 | ||||
#: ../Doc/howto/unicode.rst:253 | ||||
msgid "" | ||||
"One-character Unicode strings can also be created with the :func:`chr` built-" | ||||
"in function, which takes integers and returns a Unicode string of length 1 " | ||||
| | @ -451,18 +462,18 @@ msgid "" | |||
"returns the code point value::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:260 | ||||
#: ../Doc/howto/unicode.rst:265 | ||||
msgid "Converting to Bytes" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:262 | ||||
#: ../Doc/howto/unicode.rst:267 | ||||
msgid "" | ||||
"The opposite method of :meth:`bytes.decode` is :meth:`str.encode`, which " | ||||
"returns a :class:`bytes` representation of the Unicode string, encoded in " | ||||
"the requested *encoding*." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:266 | ||||
#: ../Doc/howto/unicode.rst:271 | ||||
msgid "" | ||||
"The *errors* parameter is the same as the parameter of the :meth:`~bytes." | ||||
"decode` method but supports a few more possible handlers. As well as " | ||||
| | @ -473,11 +484,11 @@ msgid "" | |||
"``namereplace`` (inserts a ``\\N{...}`` escape sequence)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:274 | ||||
#: ../Doc/howto/unicode.rst:279 | ||||
msgid "The following example shows the different results::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:295 | ||||
#: ../Doc/howto/unicode.rst:300 | ||||
msgid "" | ||||
"The low-level routines for registering and accessing the available encodings " | ||||
"are found in the :mod:`codecs` module. Implementing new encodings also " | ||||
| | @ -487,11 +498,11 @@ msgid "" | |||
"module won't be covered in this HOWTO." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:304 | ||||
#: ../Doc/howto/unicode.rst:309 | ||||
msgid "Unicode Literals in Python Source Code" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:306 | ||||
#: ../Doc/howto/unicode.rst:311 | ||||
msgid "" | ||||
"In Python source code, specific Unicode code points can be written using the " | ||||
"``\\u`` escape sequence, which is followed by four hex digits giving the " | ||||
| | @ -499,7 +510,7 @@ msgid "" | |||
"digits, not four::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:318 | ||||
#: ../Doc/howto/unicode.rst:323 | ||||
msgid "" | ||||
"Using escape sequences for code points greater than 127 is fine in small " | ||||
"doses, but becomes an annoyance if you're using many accented characters, as " | ||||
| | @ -508,7 +519,7 @@ msgid "" | |||
"function, but this is even more tedious." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:324 | ||||
#: ../Doc/howto/unicode.rst:329 | ||||
msgid "" | ||||
"Ideally, you'd want to be able to write literals in your language's natural " | ||||
"encoding. You could then edit Python source code with your favorite editor " | ||||
| | @ -516,7 +527,7 @@ msgid "" | |||
"characters used at runtime." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:329 | ||||
#: ../Doc/howto/unicode.rst:334 | ||||
msgid "" | ||||
"Python supports writing source code in UTF-8 by default, but you can use " | ||||
"almost any encoding if you declare the encoding being used. This is done by " | ||||
| | @ -524,7 +535,7 @@ msgid "" | |||
"file::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:339 | ||||
#: ../Doc/howto/unicode.rst:344 | ||||
msgid "" | ||||
"The syntax is inspired by Emacs's notation for specifying variables local to " | ||||
"a file. Emacs supports many different variables, but Python only supports " | ||||
| | @ -533,17 +544,17 @@ msgid "" | |||
"looks for ``coding: name`` or ``coding=name`` in the comment." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:345 | ||||
#: ../Doc/howto/unicode.rst:350 | ||||
msgid "" | ||||
"If you don't include such a comment, the default encoding used will be UTF-8 " | ||||
"as already mentioned. See also :pep:`263` for more information." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:350 | ||||
#: ../Doc/howto/unicode.rst:355 | ||||
msgid "Unicode Properties" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:352 | ||||
#: ../Doc/howto/unicode.rst:357 | ||||
msgid "" | ||||
"The Unicode specification includes a database of information about code " | ||||
"points. For each defined code point, the information includes the " | ||||
| | @ -553,17 +564,17 @@ msgid "" | |||
"related properties, such as how to use the code point in bidirectional text." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:360 | ||||
#: ../Doc/howto/unicode.rst:365 | ||||
msgid "" | ||||
"The following program displays some information about several characters, " | ||||
"and prints the numeric value of one particular character::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:374 | ||||
#: ../Doc/howto/unicode.rst:379 | ||||
msgid "When run, this prints:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:385 | ||||
#: ../Doc/howto/unicode.rst:390 | ||||
msgid "" | ||||
"The category codes are abbreviations describing the nature of the character. " | ||||
"These are grouped into categories such as \"Letter\", \"Number\", " | ||||
| | @ -576,11 +587,11 @@ msgid "" | |||
"codes." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:396 | ||||
#: ../Doc/howto/unicode.rst:401 | ||||
msgid "Comparing Strings" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:398 | ||||
#: ../Doc/howto/unicode.rst:403 | ||||
msgid "" | ||||
"Unicode adds some complication to comparing strings, because the same set of " | ||||
"characters can be represented by different sequences of code points. For " | ||||
| | @ -590,7 +601,7 @@ msgid "" | |||
"when printed, but one is a string of length 1 and the other is of length 2." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:406 | ||||
#: ../Doc/howto/unicode.rst:411 | ||||
msgid "" | ||||
"One tool for a case-insensitive comparison is the :meth:`~str.casefold` " | ||||
"string method that converts a string to a case-insensitive form following an " | ||||
| | @ -599,7 +610,7 @@ msgid "" | |||
"which becomes the pair of lowercase letters 'ss'." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:419 | ||||
#: ../Doc/howto/unicode.rst:424 | ||||
msgid "" | ||||
"A second tool is the :mod:`unicodedata` module's :func:`~unicodedata." | ||||
"normalize` function that converts strings to one of several normal forms, " | ||||
| | @ -609,22 +620,22 @@ msgid "" | |||
"differently:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:442 | ||||
#: ../Doc/howto/unicode.rst:447 | ||||
msgid "When run, this outputs:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:451 | ||||
#: ../Doc/howto/unicode.rst:456 | ||||
msgid "" | ||||
"The first argument to the :func:`~unicodedata.normalize` function is a " | ||||
"string giving the desired normalization form, which can be one of 'NFC', " | ||||
"'NFKC', 'NFD', and 'NFKD'." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:455 | ||||
#: ../Doc/howto/unicode.rst:460 | ||||
msgid "The Unicode Standard also specifies how to do caseless comparisons::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:471 | ||||
#: ../Doc/howto/unicode.rst:476 | ||||
msgid "" | ||||
"This will print ``True``. (Why is :func:`NFD` invoked twice? Because there " | ||||
"are a few characters that make :meth:`casefold` return a non-normalized " | ||||
| | @ -632,11 +643,11 @@ msgid "" | |||
"Unicode Standard for a discussion and an example.)" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:478 | ||||
#: ../Doc/howto/unicode.rst:483 | ||||
msgid "Unicode Regular Expressions" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:480 | ||||
#: ../Doc/howto/unicode.rst:485 | ||||
msgid "" | ||||
"The regular expressions supported by the :mod:`re` module can be provided " | ||||
"either as bytes or strings. Some of the special character sequences such as " | ||||
| | @ -646,57 +657,57 @@ msgid "" | |||
"in the ``'Nd'`` category." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:487 | ||||
#: ../Doc/howto/unicode.rst:492 | ||||
msgid "" | ||||
"The string in this example has the number 57 written in both Thai and Arabic " | ||||
"numerals::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:497 | ||||
#: ../Doc/howto/unicode.rst:502 | ||||
msgid "" | ||||
"When executed, ``\\d+`` will match the Thai numerals and print them out. If " | ||||
"you supply the :const:`re.ASCII` flag to :func:`~re.compile`, ``\\d+`` will " | ||||
"match the substring \"57\" instead." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:501 | ||||
#: ../Doc/howto/unicode.rst:506 | ||||
msgid "" | ||||
"Similarly, ``\\w`` matches a wide variety of Unicode characters but only " | ||||
"``[a-zA-Z0-9_]`` in bytes or if :const:`re.ASCII` is supplied, and ``\\s`` " | ||||
"will match either Unicode whitespace characters or ``[ \\t\\n\\r\\f\\v]``." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:512 | ||||
#: ../Doc/howto/unicode.rst:517 | ||||
msgid "Some good alternative discussions of Python's Unicode support are:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:514 | ||||
#: ../Doc/howto/unicode.rst:519 | ||||
msgid "" | ||||
"`Processing Text Files in Python 3 <http://python-notes.curiousefficiency." | ||||
"org/en/latest/python3/text_file_processing.html>`_, by Nick Coghlan." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:515 | ||||
#: ../Doc/howto/unicode.rst:520 | ||||
msgid "" | ||||
"`Pragmatic Unicode <https://nedbatchelder.com/text/unipain.html>`_, a PyCon " | ||||
"2012 presentation by Ned Batchelder." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:517 | ||||
#: ../Doc/howto/unicode.rst:522 | ||||
msgid "" | ||||
"The :class:`str` type is described in the Python library reference at :ref:" | ||||
"`textseq`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:520 | ||||
#: ../Doc/howto/unicode.rst:525 | ||||
msgid "The documentation for the :mod:`unicodedata` module." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:522 | ||||
#: ../Doc/howto/unicode.rst:527 | ||||
msgid "The documentation for the :mod:`codecs` module." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:524 | ||||
#: ../Doc/howto/unicode.rst:529 | ||||
msgid "" | ||||
"Marc-André Lemburg gave `a presentation titled \"Python and Unicode\" (PDF " | ||||
"slides) <https://downloads.egenix.com/python/Unicode-EPC2002-Talk.pdf>`_ at " | ||||
| | @ -705,18 +716,18 @@ msgid "" | |||
"``unicode`` and literals start with ``u``)." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:532 | ||||
#: ../Doc/howto/unicode.rst:537 | ||||
msgid "Reading and Writing Unicode Data" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:534 | ||||
#: ../Doc/howto/unicode.rst:539 | ||||
msgid "" | ||||
"Once you've written some code that works with Unicode data, the next problem " | ||||
"is input/output. How do you get Unicode strings into your program, and how " | ||||
"do you convert Unicode into a form suitable for storage or transmission?" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:538 | ||||
#: ../Doc/howto/unicode.rst:543 | ||||
msgid "" | ||||
"It's possible that you may not need to do anything depending on your input " | ||||
"sources and output destinations; you should check whether the libraries used " | ||||
| | @ -725,7 +736,7 @@ msgid "" | |||
"valued columns and can return Unicode values from an SQL query." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:544 | ||||
#: ../Doc/howto/unicode.rst:549 | ||||
msgid "" | ||||
"Unicode data is usually converted to a particular encoding before it gets " | ||||
"written to disk or sent over a socket. It's possible to do all the work " | ||||
| | @ -734,7 +745,7 @@ msgid "" | |||
"recommended." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:549 | ||||
#: ../Doc/howto/unicode.rst:554 | ||||
msgid "" | ||||
"One problem is the multi-byte nature of encodings; one Unicode character can " | ||||
"be represented by several bytes. If you want to read the file in arbitrary-" | ||||
| | @ -748,7 +759,7 @@ msgid "" | |||
"version in memory.)" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:559 | ||||
#: ../Doc/howto/unicode.rst:564 | ||||
msgid "" | ||||
"The solution would be to use the low-level decoding interface to catch the " | ||||
"case of partial coding sequences. The work of implementing this has already " | ||||
| | @ -760,17 +771,17 @@ msgid "" | |||
"meth:`str.encode` and :meth:`bytes.decode`." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:568 | ||||
#: ../Doc/howto/unicode.rst:573 | ||||
msgid "Reading Unicode from a file is therefore simple::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:574 | ||||
#: ../Doc/howto/unicode.rst:579 | ||||
msgid "" | ||||
"It's also possible to open files in update mode, allowing both reading and " | ||||
"writing::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:582 | ||||
#: ../Doc/howto/unicode.rst:587 | ||||
msgid "" | ||||
"The Unicode character ``U+FEFF`` is used as a byte-order mark (BOM), and is " | ||||
"often written as the first character of a file in order to assist with " | ||||
| | @ -783,7 +794,7 @@ msgid "" | |||
"the BOM." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:591 | ||||
#: ../Doc/howto/unicode.rst:596 | ||||
msgid "" | ||||
"In some areas, it is also convention to use a \"BOM\" at the start of UTF-8 " | ||||
"encoded files; the name is misleading since UTF-8 is not byte-order " | ||||
| | @ -792,11 +803,11 @@ msgid "" | |||
"if present." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:598 | ||||
#: ../Doc/howto/unicode.rst:603 | ||||
msgid "Unicode filenames" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:600 | ||||
#: ../Doc/howto/unicode.rst:605 | ||||
msgid "" | ||||
"Most of the operating systems in common use today support filenames that " | ||||
"contain arbitrary Unicode characters. Usually this is implemented by " | ||||
| | @ -808,7 +819,7 @@ msgid "" | |||
"haven't, the default encoding is again UTF-8." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:610 | ||||
#: ../Doc/howto/unicode.rst:615 | ||||
msgid "" | ||||
"The :func:`sys.getfilesystemencoding` function returns the encoding to use " | ||||
"on your current system, in case you want to do the encoding manually, but " | ||||
| | @ -817,13 +828,13 @@ msgid "" | |||
"and it will be automatically converted to the right encoding for you::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:620 | ||||
#: ../Doc/howto/unicode.rst:625 | ||||
msgid "" | ||||
"Functions in the :mod:`os` module such as :func:`os.stat` will also accept " | ||||
"Unicode filenames." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:623 | ||||
#: ../Doc/howto/unicode.rst:628 | ||||
msgid "" | ||||
"The :func:`os.listdir` function returns filenames, which raises an issue: " | ||||
"should it return the Unicode version of filenames, or should it return bytes " | ||||
| | @ -836,17 +847,17 @@ msgid "" | |||
"program::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:641 | ||||
#: ../Doc/howto/unicode.rst:646 | ||||
msgid "will produce the following output:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:649 | ||||
#: ../Doc/howto/unicode.rst:654 | ||||
msgid "" | ||||
"The first list contains UTF-8-encoded filenames, and the second list " | ||||
"contains the Unicode versions." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:652 | ||||
#: ../Doc/howto/unicode.rst:657 | ||||
msgid "" | ||||
"Note that on most occasions, you should can just stick with using Unicode " | ||||
"with these APIs. The bytes APIs should only be used on systems where " | ||||
| | @ -854,27 +865,27 @@ msgid "" | |||
"now." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:659 | ||||
#: ../Doc/howto/unicode.rst:664 | ||||
msgid "Tips for Writing Unicode-aware Programs" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:661 | ||||
#: ../Doc/howto/unicode.rst:666 | ||||
msgid "" | ||||
"This section provides some suggestions on writing software that deals with " | ||||
"Unicode." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:664 | ||||
#: ../Doc/howto/unicode.rst:669 | ||||
msgid "The most important tip is:" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:666 | ||||
#: ../Doc/howto/unicode.rst:671 | ||||
msgid "" | ||||
"Software should only work with Unicode strings internally, decoding the " | ||||
"input data as soon as possible and encoding the output only at the end." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:669 | ||||
#: ../Doc/howto/unicode.rst:674 | ||||
msgid "" | ||||
"If you attempt to write processing functions that accept both Unicode and " | ||||
"byte strings, you will find your program vulnerable to bugs wherever you " | ||||
| | @ -883,7 +894,7 @@ msgid "" | |||
"raised." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:674 | ||||
#: ../Doc/howto/unicode.rst:679 | ||||
msgid "" | ||||
"When using data coming from a web browser or some other untrusted source, a " | ||||
"common technique is to check for illegal characters in a string before using " | ||||
| | @ -895,28 +906,28 @@ msgid "" | |||
"then choose a clever way to hide malicious text in the encoded bytestream." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:685 | ||||
#: ../Doc/howto/unicode.rst:690 | ||||
msgid "Converting Between File Encodings" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:687 | ||||
#: ../Doc/howto/unicode.rst:692 | ||||
msgid "" | ||||
"The :class:`~codecs.StreamRecoder` class can transparently convert between " | ||||
"encodings, taking a stream that returns data in encoding #1 and behaving " | ||||
"like a stream returning data in encoding #2." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:691 | ||||
#: ../Doc/howto/unicode.rst:696 | ||||
msgid "" | ||||
"For example, if you have an input file *f* that's in Latin-1, you can wrap " | ||||
"it with a :class:`~codecs.StreamRecoder` to return bytes encoded in UTF-8::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:705 | ||||
#: ../Doc/howto/unicode.rst:710 | ||||
msgid "Files in an Unknown Encoding" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:707 | ||||
#: ../Doc/howto/unicode.rst:712 | ||||
msgid "" | ||||
"What can you do if you need to make a change to a file, but don't know the " | ||||
"file's encoding? If you know the encoding is ASCII-compatible and only want " | ||||
| | @ -924,7 +935,7 @@ msgid "" | |||
"``surrogateescape`` error handler::" | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:721 | ||||
#: ../Doc/howto/unicode.rst:726 | ||||
msgid "" | ||||
"The ``surrogateescape`` error handler will decode any non-ASCII bytes as " | ||||
"code points in a special range running from U+DC80 to U+DCFF. These code " | ||||
| | @ -932,14 +943,14 @@ msgid "" | |||
"error handler is used to encode the data and write it back out." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:731 | ||||
#: ../Doc/howto/unicode.rst:736 | ||||
msgid "" | ||||
"One section of `Mastering Python 3 Input/Output <http://pyvideo.org/" | ||||
"video/289/pycon-2010--mastering-python-3-i-o>`_, a PyCon 2010 talk by David " | ||||
"Beazley, discusses text processing and binary data handling." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:735 | ||||
#: ../Doc/howto/unicode.rst:740 | ||||
msgid "" | ||||
"The `PDF slides for Marc-André Lemburg's presentation \"Writing Unicode-" | ||||
"aware Applications in Python\" <https://downloads.egenix.com/python/LSM2005-" | ||||
| | @ -948,25 +959,25 @@ msgid "" | |||
"application. These slides cover Python 2.x only." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:741 | ||||
#: ../Doc/howto/unicode.rst:746 | ||||
msgid "" | ||||
"`The Guts of Unicode in Python <http://pyvideo.org/video/1768/the-guts-of-" | ||||
"unicode-in-python>`_ is a PyCon 2013 talk by Benjamin Peterson that " | ||||
"discusses the internal Unicode representation in Python 3.3." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:748 | ||||
#: ../Doc/howto/unicode.rst:753 | ||||
msgid "Acknowledgements" | ||||
msgstr "Remerciements" | ||||
| ||||
#: ../Doc/howto/unicode.rst:750 | ||||
#: ../Doc/howto/unicode.rst:755 | ||||
msgid "" | ||||
"The initial draft of this document was written by Andrew Kuchling. It has " | ||||
"since been revised further by Alexander Belopolsky, Georg Brandl, Andrew " | ||||
"Kuchling, and Ezio Melotti." | ||||
msgstr "" | ||||
| ||||
#: ../Doc/howto/unicode.rst:754 | ||||
#: ../Doc/howto/unicode.rst:759 | ||||
msgid "" | ||||
"Thanks to the following people who have noted errors or offered suggestions " | ||||
"on this article: Éric Araujo, Nicholas Bastin, Nick Coghlan, Marius " | ||||
| | | |||
Loading…
Add table
Add a link
Reference in a new issue