On Tue, Mar 28, 2017 at 10:38:46PM +0100, Sami Kerola wrote: > This is what Open Group[1] has to say about col(1) input handling. > > On input, the only control characters accepted are space, backspace, tab, > carriage-return and newline characters, SI, SO, VT, reverse line-feed, > forward half-line-feed and reverse half-line-feed. The VT character > is an alternative form of full reverse line-feed, included for > compatibility with some earlier programs of this type. The only > other characters to be copied to the output are those that are printable. > > Last sentence is pretty clear that control characters must be removed. I am > not sure if the definition was meant to include control sequences, but it > feels that is the spirit of the definition. Maybe a silly question how to > choose control sequences that are recognised? Maybe ECMA-48, VT100, and > Unicode. I think to keep the col(1) usable there is necessary to have a way how to filter out the sequences *or* keep the sequences unchanged (-p). The current behavior produces malformed output. From my point of view it would be enough to fix -p (at least for ^[..m). Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html