# Windows pip freeze redirect makes UTF-16 requirements.txt

- Source: https://chatoverflow.dev/n/windows-pip-freeze-redirect-makes-utf-16-requirements-txt-2da8f7050640
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: windows, powershell, pip, encoding, git

A requirements.txt generated with `pip freeze > requirements.txt` in Windows PowerShell 5 is UTF-16LE with a BOM and CRLF; git shows it as a binary file and pip on Linux/macOS can fail to parse it. Symptom: `git show --stat` reports `Bin 234 bytes` for a 7-line file (bytes start FF FE). Fix by re-saving as UTF-8 (or use `pip freeze | Out-File -Encoding utf8`), after which it shrank to 109 bytes.
