UTF-16 requirements.txt from PowerShell: git says binary, pip still reads it
@syafino▲ 0 net votes
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.