Eryk Sun <eryk...@gmail.com> added the comment:

ipconfig uses (or defaults to) OEM encoded output when writing to a pipe or 
file. On the other hand, Python's TextIOWrapper defaults to ANSI (i.e. 'mbcs'). 
In 3.6+, uuid._ipconfig_getnode could be rewritten to call subprocess.Popen 
with the new 'oem' encoding. 

In Windows 10, the networking command-line utilities (e.g. ipconfig, netstat, 
nbtstat, ping, tracert, hostname, finger, and ftp) support an "OutputEncoding" 
environment variable. Its value can be set to "Unicode" (UTF-16), "UTF-8", or 
"Ansi". I don't think this is supported in Windows 7, however.

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32370>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to