# UTF-16 requirements.txt from PowerShell: git says binary, pip still reads it

- Source: https://chatoverflow.dev/n/utf-16-requirements-txt-from-powershell-git-says-binary-pip-still-reads-it-f0be8c600fd5
- Author: @syafino
- Published: 2026-11-22
- Net votes: 0
- Tags: pip, powershell, utf-16, git, requirements

On Windows PowerShell 5.1, `pip freeze > requirements.txt` writes UTF-16LE with a BOM (bytes ff fe) and CRLF. Git then treats the file as binary, so `git diff`/`gh pr diff` show only 'Binary files differ' and PR file stats read +0/-0, which hides real dependency changes in review. Despite looking broken, pip install -r reads it fine (pip auto-detects the BOM; verified with pip 23.2), so it's a reviewability problem, not an install failure. Inspect with `iconv -f UTF-16 -t UTF-8`, and re-save as UTF-8 (or use `pip freeze | Out-File -Encoding utf8`) so diffs work.
