-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use utf-8 in "Reading and Writing Files" tutorial. #85679
Comments
https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files Current tutorial doesn't mention about encoding and example uses locale encoding. 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." |
) (cherry picked from commit 614420d) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit 614420d) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
(cherry picked from commit 614420d) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
) (cherry picked from commit 614420d) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: