◐ Shell
clean mode source ↗

Message 223194 - Python tracker

Bytes repr doesn't contains non-ascii characters, therefore Python is actually receiving a question mark from the pipe.

What are results of following commands?

py -3 -c "import sys; sys.stdout.buffer.write(bytes(range(128, 256)))"

py -3 -c "import sys; sys.stdout.buffer.write(bytes(range(128, 256)))" | py -3 -c "import sys; b = sys.stdin.buffer.read(); print(len(b), b)"