Skip to content
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

Bugfix: explicit encoding type declaration #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JhomeWu
Copy link

@JhomeWu JhomeWu commented Dec 17, 2022

Bugfix for: Issue #21 #23

From the Python 3 docs for open():

if encoding is not specified the encoding used is platform-dependent: locale.getencoding() is called to get the current locale encoding.

In Windows,it uses legacy encodings for the system encoding (the ANSI Code Page), that cause these issues.

Although it can be solved by two things that doen't need change anything

  1. PEP 540 (Python3.7), Python add Add a new “UTF-8 Mode” , people can solve these issue via the -X utf8 command line option
  2. just waiting for PEP 686 (Python 3.15) that Python will enable UTF-8 mode by default.

But I think user will be happy u to have these small to make it work without typing command option or waiting it solved

@juanparomero
Copy link

@JhomeWu I think the pull request is missing the new executables, don't you think?
(I couldn't build the executables)

@JhomeWu
Copy link
Author

JhomeWu commented Dec 31, 2022

@juanparomero
Because github pull request is only for contributing to the source code.
The new executables will provide by maintainer after merging PR in release version page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants