Skip to content

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. 😅

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