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 methane
Recipients docs@python, methane
Date 2020-08-08.03:14:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596856484.75.0.552563820268.issue41507@roundup.psfhosted.org>
In-reply-to
Content
https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

Current tutorial doesn't mention about encoding and example uses locale encoding.
Since UTF-8 is major text encoding and many Windows environment doesn't use UTF-8 by default, encoding should be mentioned in the tutorial and UTF-8 should be recommended.

Additionally, the paragraph about line ending conversion [1] can be removed. This was important in Python 2. But it is not important because (en|de)coding binary data is nonsense already.

[1]: "This behind-the-scenes modification to file data is fine for text files, but will corrupt binary data like that in JPEG or EXE files. Be very careful to use binary mode when reading and writing such files."
History
Date User Action Args
2020-08-08 03:14:44methanesetrecipients: + methane, docs@python
2020-08-08 03:14:44methanesetmessageid: <1596856484.75.0.552563820268.issue41507@roundup.psfhosted.org>
2020-08-08 03:14:44methanelinkissue41507 messages
2020-08-08 03:14:44methanecreate