Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Setup: Prevent encoding issue while installing package#5

Open
QuentinCG wants to merge 1 commit intoActiveState:master from
QuentinCG:master
Open

Setup: Prevent encoding issue while installing package #5
QuentinCG wants to merge 1 commit intoActiveState:master from
QuentinCG:master

Conversation

@QuentinCG
Copy link

@QuentinCG QuentinCG commented Oct 4, 2019

Python opens files using the encoding returned by
locale.getpreferredencoding(), which is 'cp1252' in Windows.
For cross-platform compatibility, it is needed to explicitly
specify 'utf-8' when reading files.

File is also opened in read-only since it is not necessary
to have write access to README and NEWS files during install.

Python opens files using the encoding returned by
locale.getpreferredencoding(), which is 'cp1252' in Windows.
For cross-platform compatibility, it is needed to explicitly
specify 'utf-8' when reading files.
File is also opened in read-only since it is not necessary
to have write access to README and LICENCE files during install.
Copy link
Author

Note: For python2.7+ compatibility, it is needed to add import io and use io.open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /