[issue45382] platform() is not able to detect windows 11
Eryk Sun
report at bugs.python.org
Wed Jan 26 10:47:55 EST 2022
Eryk Sun <eryksun at gmail.com> added the comment:
> AFAIK, the Win32_OperatingSystem caption is always ASCII.
I think I was wrong here. The "Caption" field is localized, so the wmic.exe OEM encoded output to a pipe isn't reliable. The system OEM code page doesn't necessarily match the display/preferred language of the current user. It could be a lossy encoding with default and best-fit translations (e.g. "?"; "α" -> "a"). If using wmic.exe, it's better to redirect the output to a temp file, which will be UTF-16.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45382>
_______________________________________
More information about the Python-bugs-list
mailing list