diff options
author | Raymond Hettinger <python@rcn.com> | 2011-01-21 09:18:19 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-01-21 09:18:19 (GMT) |
commit | 2e042d3dc26d852f9ad89edb2a48d40c376ba968 (patch) | |
tree | 854ed64d3bd3edf363dec75ec89f0c5fc32398cd /Doc | |
parent | 7a168d96dddf4351e022e43928b737903df85e80 (diff) | |
download | cpython-2e042d3dc26d852f9ad89edb2a48d40c376ba968.zip cpython-2e042d3dc26d852f9ad89edb2a48d40c376ba968.tar.gz cpython-2e042d3dc26d852f9ad89edb2a48d40c376ba968.tar.bz2 |
Use a Latin-1 example that won't break the LaTeX PDF build.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/3.2.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index ba2bac6..2469d7e 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -1167,10 +1167,9 @@ variables. The :mod:`os` module provides two new functions, :func:`~os.fsencode` and :func:`~os.fsdecode`, for encoding and decoding filenames: ->>> filename = 'словарь' +>>> filename = 'Sehenswürdigkeiten' >>> os.fsencode(filename) -b'\xd1\x81\xd0\xbb\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80\xd1\x8c' ->>> open(os.fsencode(filename)) +b'Sehensw\xc3\xbcrdigkeiten' Some operating systems allow direct access to the unencoded bytes in the environment. If so, the :attr:`os.supports_bytes_environ` constant will be @@ -1802,7 +1801,7 @@ decoding, and ``'strict'`` and ``'replace'`` for encoding. To emulate Python3.1 MBCS encoding, select the ``'ignore'`` handler for decoding and the ``'replace'`` handler for encoding. -On Mac OS/X, Python decodes command line arguments with ``'utf-8'`` rather than +On Mac OS X, Python decodes command line arguments with ``'utf-8'`` rather than the locale encoding. By default, :mod:`tarfile` uses ``'utf-8'`` encoding on Windows (instead of |