Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e042d3

Browse files
committed
Use a Latin-1 example that won't break the LaTeX PDF build.
1 parent 7a168d9 commit 2e042d3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Doc/whatsnew/3.2.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,10 +1167,9 @@ variables. The :mod:`os` module provides two new functions,
11671167
:func:`~os.fsencode` and :func:`~os.fsdecode`, for encoding and decoding
11681168
filenames:
11691169

1170-
>>> filename = 'словарь'
1170+
>>> filename = 'Sehenswürdigkeiten'
11711171
>>> os.fsencode(filename)
1172-
b'\xd1\x81\xd0\xbb\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80\xd1\x8c'
1173-
>>> open(os.fsencode(filename))
1172+
b'Sehensw\xc3\xbcrdigkeiten'
11741173

11751174
Some operating systems allow direct access to the unencoded bytes in the
11761175
environment. If so, the :attr:`os.supports_bytes_environ` constant will be
@@ -1802,7 +1801,7 @@ decoding, and ``'strict'`` and ``'replace'`` for encoding.
18021801
To emulate Python3.1 MBCS encoding, select the ``'ignore'`` handler for decoding
18031802
and the ``'replace'`` handler for encoding.
18041803

1805-
On Mac OS/X, Python decodes command line arguments with ``'utf-8'`` rather than
1804+
On Mac OS X, Python decodes command line arguments with ``'utf-8'`` rather than
18061805
the locale encoding.
18071806

18081807
By default, :mod:`tarfile` uses ``'utf-8'`` encoding on Windows (instead of

0 commit comments

Comments
 (0)