On Wed, Dec 13, 2023 at 11:17:17AM +0700, Đoàn Trần Công Danh wrote: [] > Would it work if you always open the file as BINARY? Yes, I think so. > And let's all the > conversion done by git via some configs (core.encoding?)? We already have an attribute, "working-tree-encoding", that can tell Git to do the encoding/reencoding. The advantage of the .gitattributes file is, that it is typically commit into the repo, and travels with `git push` and `git fetch` or `git pull` to the different work stations, so that everybody has the same settings. In opposite, config files are always local. So that everybody should do the same (local) git config. If that is forgotten for some reason, then different configurations leads often to some kind of chaos. But I don't have a z/os sytem to test on.