Problem with "git show" not returning the correct output
A command like this "git show a325acf:TEXT/TEST.txt >/tmp/test.txt" should extract from commit a325acf the file TEXT/TEST.txt and save it to /tmp/test.txt. My TEXT/TEST.txt file happens to contain all hex characters from X'00' to X'FF' (excluding X'15') . If I perform a SuperC comparison between my file and the file extracted file (/tmp/test.txt) from the git show command I'd expect the files to be the same. But that is not what I am getting (see extract below)
Some of the the characters, on the white lines, are now two bytes and not one.
Now I understand that converting IBM-1047 to UTF-8 will translate some characters from a single byte to a two byte representation, but I would expect that when translating from UTF-8 encoding to IBM-1047 the two bytes would be translated back to one.
This is certainly what is happening when to perform a "git checkout" or "git restore" but not with the "git show".
------------------------------
Gary Freestone
Systems Programmer
Kyndryl Inc
Mt Helen VIC AU
------------------------------
Some of the the characters, on the white lines, are now two bytes and not one. Now I understand that converting IBM-1047 to UTF-8 will translate some characters from a single byte to a two byte representation, but I would expect that when translating from UTF-8 encoding to IBM-1047 the two bytes would be translated back to one.
This is certainly what is happening when to perform a "git checkout" or "git restore" but not with the "git show".
------------------------------
Gary Freestone
Systems Programmer
Kyndryl Inc
Mt Helen VIC AU
------------------------------