Kent Karlsson wrote:There are and BOM handling could arguably within its reach, but
I'm not going into the implementation part; just pointing out that"cat" and "cp" can and shall ignore it. They are octet-level
this issue is not something an operating system can ignore.
file operations, attaching no semantics to the octets. Try "iconv".
This byte-level operation is the just the default behavior. This basic behavior should remain the default, of course.
However, there already are a lot of options specific to text files, that
*do* attach character semantics to octets, such as the "-n" option to number
output lines:
expecting poor cat(1) to do the codeset conversion is squarely against
the Unix philosophy of doing well one thing at a time. Why bother if you can just use iconv(1) for the job combined with
other tools?
Jungshik