In order to fix the bug with packing a Python application as a snap I am ready to add this code:
# I don't know what I am doing
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
There is a lot of text that seems to explain what a LC_ALL=C
does (but not LC_ALL=C.UTF-8
or LANG=C.UTF-8
) and a big text that explains the bug and the Python behavior. But none of them fits my small head. Usually I enjoy wrapping my head around the gory technical details, but lately a time pressure makes me rather ignorant.
I just want to know what is the meaning of the phrase This system supports the C.UTF-8 locale
and what will happen if I set those variables to switch to it? (which I guess is made by setting those environment variables)
sys.std*
is set at runtime through some heuristic involving env variables likeLC_ALL
. If I understand your case correctly, you can check if this works by inspecting the value oflocale.getpreferredencoding()
. It should be something like "UTF-8". – Disrepairlocale -a
show you which local you have installed. UTF-8 locales will break a lot utilities which have non UTF-8 text (so invalid sequences) – Lynnett