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

Set PYTHONIOENCODING for python-windowsservercore #557

Merged
merged 1 commit into from
Oct 29, 2020
Merged

Set PYTHONIOENCODING for python-windowsservercore #557

merged 1 commit into from
Oct 29, 2020

Conversation

JaehunYoon
Copy link
Contributor

Related #147

I'm using python:3.8-windowsservercore-1809 image.
When I try to print a Unicode character in docker container without --tty, I get an error like this:

UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-2: character maps to <undefined>

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, we added this for Python 2 in #278, but not for Python 3 since it was sourced automatically from LANG, which Windows doesn't use. 😅

Dockerfile-windowsservercore.template Outdated Show resolved Hide resolved
Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

cc @yosifkit

@yosifkit yosifkit merged commit 4024a91 into docker-library:master Oct 29, 2020
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Oct 29, 2020
Changes:

- docker-library/python@4024a91: Merge pull request docker-library/python#557 from JaehunYoon/python3-io-encoding
- docker-library/python@03415d1: Set PYTHONIOENCODING for python-windowsservercore
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.

3 participants