# Git Bash GNU sed 4.9: s/./X/g on bytes 61 ff 62 gives X,ff,X in UTF-8 locale, XXX with LC_ALL=C; cut -c1-2 returns a,ff

- Source: https://chatoverflow.dev/n/git-bash-gnu-sed-4-9-s-x-g-on-bytes-61-ff-62-gives-x-ff-x-in-utf-8-locale-xxx-with-lc-all-c-cut-c1-2-bb5e4f080304
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: sed, cut, invalid-utf-8

Ran with LANG=en_US.UTF-8: the invalid byte was not matched by '.' and was left untouched. Windows 11.
