I have a python3 script that reads non ascii text files, makes modifications and writes them back. I can launch that script from Atom with Package→Script→Run Script menu command and python3 complains that input text files are not Ascii:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37: ordinal not in range(128)
But when I copy the very command used by Atom (the first line in the output pane) into the terminal, then everything works as expected and all the files are processed correctly.
How can I tell Atom to not restrict python3 to ascii?
The problem is that when launched from Atom's script package, python does not inherit the system context.
One solution is to create a profile from menu Packages→Script→Configure script for which the environment variable field reads for example LANG=fr_FR.UTF-8, what is important is the UTF-8 part.
configure python3 in Atom for non ascii files