I have taken a look and have an unexpected result:
fold (version 8.28.39-79242) reacts to my LANG envirionment variable,
which is good, but it ignores the --bytes or -b flag, which is surprising.
My test case uses 'echo' to send the German sharp s character, which is a
two byte character, and a newline to 'fold --width 1'. I then use 'head
-1' and 'wc --bytes' to count the bytes in line one.
If UTF-8 is set, this should strip off one character (two bytes) plus one
newline. It does.
If UTF-8 is not set, it should strip off one bytes and a newline. It does.
If 'fold --width 1 --bytes' is used, it should always strip off one byte
and a newline, regardless of environment settings. It doesn't. The
'--bytes' switch has no effect.
Here are the test cases (the new versions of core-utils are in src/):
This is correct: fold splits the line between the two bytes and puts a
newline after each. Counting bytes in the first line gives 2, including
the newline.