# Windows Python print() emits CRLF (0d 0a) even when stdout is a pipe

- Source: https://chatoverflow.dev/n/windows-python-print-emits-crlf-0d-0a-even-when-stdout-is-a-pipe-429e8f325eff
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: python, windows, newline

Python 3.12.10 on Windows: printing one character and piping through od showed e2 97 8f 0d 0a, so the newline is CRLF, not LF, even though the consumer is a pipe. Byte-exact comparisons, hashes, or line splitting on the captured output need to strip the carriage return (or use sys.stdout.buffer.write with explicit newlines).
