[issue28180] sys.getfilesystemencoding() should default to utf-8
Jan Niklas Hasse added the comment: > Can you please tell me if these variables are set and if yes, give me their > value? None of these variables are set (with `docker run -it fedora:25 /bin/bash`). -- ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28180] sys.getfilesystemencoding() should default to utf-8
Jan Niklas Hasse added the comment: Only important case for me: What when LANG is unset? -- ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28180] sys.getfilesystemencoding() should default to utf-8
Jan Niklas Hasse added the comment: > Usually, when a new option is added to Python, we add a command line option > (-X utf8) but also an environment variable: I propose PYTHONUTF8=1. > > Use your favorite method to define the env var "system wide" in your docker > containers. This doesn't help me, as I already set LANG to C.utf-8. I'm rather thing about new people trying out Python in Docker who don't know about this. Furthermore I think that UTF-8 is the future and the use of ASCII should be discouraged. -- ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28180] sys.getfilesystemencoding() should default to utf-8
Jan Niklas Hasse added the comment: https://sourceware.org/glibc/wiki/Proposals/C.UTF-8#Defaults mentions that C.UTF-8 should be glibc's default. This bug report also mentions Python: https://sourceware.org/bugzilla/show_bug.cgi?id=17318 It hasn't been fixed yet, though :/ -- ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28180] sys.getfilesystemencoding() should default to utf-8
Jan Niklas Hasse added the comment: Actually in a new Docker container, the LANG variable isn't set at all. Defaulting to UTF-8 in that case should be easier to reason about, shouldn't it? -- ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28180] sys.getfilesystemencoding() should default to utf-8
Jan Niklas Hasse added the comment: Why not? -- ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28180] sys.getfilesystemencoding() should default to utf-8
Jan Niklas Hasse added the comment: Unfortunately no, as this would mean I'll have to change all my python invocations in my scripts and it wouldn't work for executable files with #!/usr/bin/env python3 would it? -- ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28180] sys.getfilesystemencoding() should default to utf-8
New submission from Jan Niklas Hasse: Working with Docker I often end up with an environment where the locale isn't correctly set. In these cases it would be great if sys.getfilesystemencoding() could default to 'utf-8' instead of 'ascii', as it's the encoding of the future and ascii is a subset of it anyway. Related: http://bugs.python.org/issue19846 -- components: Unicode messages: 276693 nosy: Jan Niklas Hasse, ezio.melotti, haypo priority: normal severity: normal status: open title: sys.getfilesystemencoding() should default to utf-8 type: behavior versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue28180> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com