Jason R. Coombs added the comment:

Here I use the british pound symbol to attempt to answer that question. I've 
disabled the environment variable PYTHONIOENCODING and not set any code page or 
loaded any other Powershell profile settings.

PS C:\Users\jaraco> echo £
£
PS C:\Users\jaraco> chcp
Active code page: 437
PS C:\Users\jaraco> echo £ | py -3 -c "import sys; 
print(repr(sys.stdin.read()))"
'?\n'
PS C:\Users\jaraco> chcp 65001
Active code page: 65001
PS C:\Users\jaraco> echo £ | py -3 -c "import sys; 
print(repr(sys.stdin.read()))"
'?\n'
PS C:\Users\jaraco> echo £ | py -3 -c "import sys; 
print(repr(sys.stdin.buffer.read()))"
b'?\r\n'

Curiously, it appears as if powershell is actually receiving a question mark 
from the pipe.

----------

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

Reply via email to