This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JGoutin
Recipients JGoutin, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-01-12.07:07:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
import sys

# Force the use of legacy encoding like versions of Python prior to 3.6.
sys._enablelegacywindowsfsencoding()

# Show actual file system encoding
encoding = sys.getfilesystemencoding()
print('File system encoding:', encoding)

# os.fsencode(filename) VS filename.encode(File system encoding)
import os
print(os.fsencode('é'), 'é'.encode(encoding))

>>> File system encoding: mbcs
>>> b'\xc3\xa9' b'\xe9'


The result is the same.
History
Date User Action Args
2017-01-12 07:07:47JGoutinsetrecipients: + JGoutin, paul.moore, tim.golden, zach.ware, steve.dower
2017-01-12 07:07:47JGoutinsetmessageid: <[email protected]>
2017-01-12 07:07:47JGoutinlinkissue29241 messages
2017-01-12 07:07:46JGoutincreate