15 Nov
2015
15 Nov
'15
6:55 a.m.
Chris Angelico
Can the py.exe launcher handle a UTF-16 shebang? (I'm pretty sure Unix program loaders won't.)
A lot of them can't handle UTF-8 with a BOM, either.
That alone might be a reason for strongly encouraging ASCII-compat encodings.
A "python" or "python3" or "env" executable in any particular location such as /usr/bin isn't technically guaranteed, either, it's just relied on as a "works 99% of the time" thing. There's a reasonable case to be made that transforming files in such a way as they get launched by python (which may require an encoding change to an ASCII-compatible encoding, or a wrapper script, or the python -x hack) is the responsibility of platform-specific installer code.