Python 3 uses Unicode everywhere, which makes it inconvenient to use in an environment that claims not to support Unicode, such as these Docker images. The system I/O encoding ends up being "ascii", which means (for example) that non-ASCII strings simply can't be used with the print() function.
Usually, on Debian, the system's default locale would have set the encoding to UTF-8, but locales aren't installed.
The issue is easily fixed by adding one line to a Dockerfile, but I think it should be there in the Python 3 image itself so it doesn't catch people by surprise.
The line to add is:
Python 3 uses Unicode everywhere, which makes it inconvenient to use in an environment that claims not to support Unicode, such as these Docker images. The system I/O encoding ends up being "ascii", which means (for example) that non-ASCII strings simply can't be used with the
print()function.Usually, on Debian, the system's default locale would have set the encoding to UTF-8, but locales aren't installed.
The issue is easily fixed by adding one line to a Dockerfile, but I think it should be there in the Python 3 image itself so it doesn't catch people by surprise.
The line to add is: