Re: [Python-Dev] r88121 - python/branches/py3k/Doc/whatsnew/3.2.rst
21 Jan
2011
21 Jan
'11
7:33 a.m.
Am 20.01.2011 10:04, schrieb raymond.hettinger:
+os +-- + +Different operating systems use various encodings for filenames and environment +variables. The :mod:`os` module provides two new functions, +:func:`~os.fsencode` and :func:`~os.fsdecode`, for encoding and decoding +filenames: + +>>> filename = 'словарь' +>>> os.fsencode(filename) +b'\xd1\x81\xd0\xbb\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80\xd1\x8c' +>>> open(os.fsencode(filename))
Please do not include Cyrillic characters directly in the source -- it breaks the LaTeX PDF build. A non-ascii name from the latin-1 range should be fine. Georg
4842
Age (days ago)
4842
Last active (days ago)
0 comments
1 participants
participants (1)
-
Georg Brandl