[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-21 Thread Steve Dower
Steve Dower added the comment: > I've already installed for all users, just not into the default "C:\Program > Files\", but instead "C:\Programs\Python\" Ah yes, that indeed rules out my first suspicion. > Fixing tests is not enough, because it is often an issue of scripts which > write

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-21 Thread Eryk Sun
Eryk Sun added the comment: I see no problem with changing a test -- such as test_consistent_sys_path_for_direct_execution() -- to spawn the child interpreter with `-X utf8` when the I/O encoding itself is irrelevant to the test -- except for forcing a common Unicode encoding to ensure the

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not only sys.executable. Sources of non-ASCII paths: * sys.executable * __file__ of the stdlib or test modules * the current working directory * the temporary directory The last one is the most common in these failures. Tests fail when a non-ASCII path is

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-21 Thread Ming Hua
Ming Hua added the comment: Steve Dower (steve.dower) posted: > I'd guess that these tests are assuming that sys.executable contains only > ASCII characters. All the tests run in a non-ASCII working directory, so it's > only the runtime that is not tested propersy here. > > The easiest way

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-20 Thread Steve Dower
Steve Dower added the comment: I'd guess that these tests are assuming that sys.executable contains only ASCII characters. All the tests run in a non-ASCII working directory, so it's only the runtime that is not tested propersy here. The easiest way for Ming Hua to test this is to install

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-12 Thread Eryk Sun
Eryk Sun added the comment: > FWIW, I did test with "-X utf8" option I was suggesting to modify the tests to use the UTF-8 mode option in the spawn_python() command line. It doesn't help to run the parent process in UTF-8 mode since it isn't inherited. It could be inherited via PYTHONUTF8,

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-12 Thread Ming Hua
Ming Hua added the comment: Eryk Sun (eryksun) posted: > Python's default can be overridden to UTF-8 for standard I/O via > PYTHONIOENCODING, or for all I/O via PYTHONUTF8 or "-X utf8=1". FWIW, I did test with "-X utf8" option and it wasn't any better. Just tested "python.exe -X utf8=1 -m

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-12 Thread Eryk Sun
Eryk Sun added the comment: In Windows, the standard I/O encoding of the spawn_python() child defaults to the process active code page, i.e. GetACP(). In Windows 10, the active code page can be set to UTF-8 at the system or application level, but most systems and applications still use a

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Unicode nosy: +ezio.melotti, serhiy.storchaka, vstinner type: -> behavior versions: +Python 3.11 -Python 3.8 ___ Python tracker

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-12 Thread Ming Hua
New submission from Ming Hua : Background: Since at least Windows 8, it is possible to invoke the input method engine (IME) when installing Windows and creating accounts. So at least among simplified Chinese users, it's not uncommon to have a Chinese account name. Issue: After successful