Re: RFC: wc --max-line-length vs. TABs [Re: Bug in wc

2008-08-23 Thread Jim Meyering
Bruno Haible [EMAIL PROTECTED] wrote: Hi Jim, This behavior is not specified, and is currently untested. (it's a GNU invention, from Bruno Haible in textutils-1.22d, which was back in 1997) The intention of this option is and was to measure the maximum number of screen columns used by a

RFC: wc --max-line-length vs. TABs [Re: Bug in wc

2008-08-22 Thread Jim Meyering
Jim Meyering [EMAIL PROTECTED] wrote: Arnaldo Mandel [EMAIL PROTECTED] wrote: Dear maintainers, There is a bug in the implementation of the -L parameter in wc. It is triggered by http://www.ime.usp.br/~am/122/eps/gapqm2.gz Check this out: $ zcat gapqm2.gz |wc -l -c -L 1 6297954

Re: RFC: wc --max-line-length vs. TABs [Re: Bug in wc

2008-08-22 Thread Bo Borgerson
Jim Meyering wrote: I'm tempted to make the change, but it seems too drastic, after 11 years. Do any of you rely on the current TAB-counting behavior of GNU wc? Hi, It looks like TAB characters aren't alone in being counted by printed width rather than count: $ echo '好' | wc -L 2 Does it

Re: RFC: wc --max-line-length vs. TABs [Re: Bug in wc

2008-08-22 Thread Arnaldo Mandel
Bo Borgerson wrote (on Aug 22, 2008): Does it make sense to change the behavior for TAB, but not for wide characters? Relying on an undocumented tab length seems bad. However, on chars I suggest you just apply the bug-feature operator: document that line length is in chars, and explain

Re: RFC: wc --max-line-length vs. TABs [Re: Bug in wc

2008-08-22 Thread Bruno Haible
Hi Jim, This behavior is not specified, and is currently untested. (it's a GNU invention, from Bruno Haible in textutils-1.22d, which was back in 1997) The intention of this option is and was to measure the maximum number of screen columns used by a file. For many purposes, people are