Open gngrossi opened 8 months ago
We've had a lot of discussion about this and decided to make UTF-8 again the default. Git stores all files internally as UTF-8 and this way files get tagged as they are, which leads to the least surprise and it conforms to the way the Rocket version of git works. For the zopen tools this is not an issue when _BPXK_AUTOCVT=ON is set, files tagged as UTF-8 will be read binary, which leads to the same results as when they were tagged as iso8859-1. It does make a difference for the original omvs tools that run in ebcdic mode, since they also get the binary data and cannot understand it. If you prefer you can set the UTF-8 default as 819 like you indicate, which would allow the original omvs tools to work with the data, but you make a deliberate choise that way that you accept the risk that data might become corrupted. So I don't think we will change the default again.
If feasible, I suggest setting the GIT_UTF8_CCSID variable in the git env file for UTF-8 so it's available for an easy query/change (env | grep -i git) when needed.
In addition to the variable, would a .gitattributes file override the default as well?
thanks
Yes, setting this in .gitattributes will also work:
* zos-working-tree-encoding=iso8859-1
We could also add a prompt in the setup.sh or .env to ask the user if they want to change the default. If they do, it can set the environment variable or use the git config command
Correction needed on the README.md? Should read ISO8859-1 if using git config --global core.utf8ccsid 819
thanks
Since zopen sets/recommends _BPXK_AUTOCVT=ON, it seems that GIT_UTF8_CCSID=819 would be used/default as well. If UTF-8 tagging is needed, then using the variable or git config commands (git config --global core.utf8ccsid 819 or git config core.utf8ccsid 819) should be used.
Thoughts?
thanks