bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29606: Command 'fold' dangerous with utf-8 input


From: Mark Roberts
Subject: bug#29606: Command 'fold' dangerous with utf-8 input
Date: Fri, 8 Dec 2017 13:04:20 +0100 (CET)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

Dear Assaf,

the reason for the unexpected behavior of 'fold', namely that specifying --bytes doesn't make it count bytes, is evident after a look at the source code.

When --bytes is not specified, the program treats '\b', '\r' and '\t' specially. It assumes a tab width of eight (compile-time #define) and attempts to keep track of what the output will look like.

This is absolutely not what I expected. But of course, when the program was first written, the words byte and character meant the same thing for printable characters. Printable bytes.

I will attempt to suggest an improved text for the man-page so that others will not be surprised.

Mark





reply via email to

[Prev in Thread] Current Thread [Next in Thread]