bug#7915: Possible off-by-1 in wc

2011-01-25 Thread Eric Blake
On 01/25/2011 06:18 PM, Sune Mølgaard wrote: > sune@jekaterina:~$ echo Å|wc -m > 2 > sune@jekaterina:~$ echo Å|wc -c > 3 > sune@jekaterina:~$ > > Expected: 1 and 2 respectively. Thanks for the report. However, this is not a bug - echo is outputting a newline (which is a second character, and thi

bug#7915: Possible off-by-1 in wc

2011-01-25 Thread Eric Blake
[Let's keep the list in the loop] On 01/25/2011 07:04 PM, Sune Mølgaard wrote: >> Thanks for the report. However, this is not a bug - echo is outputting >> a newline (which is a second character, and third byte given the >> encoding of your chosen character). >> >> To see the difference, try: >>

bug#7915: Possible off-by-1 in wc

2011-01-25 Thread Sune Mølgaard
sune@jekaterina:~$ echo Å|wc -m 2 sune@jekaterina:~$ echo Å|wc -c 3 sune@jekaterina:~$ Expected: 1 and 2 respectively. wc is the one in Ubuntu Linux 10.10 Best regards, Sune Mølgaard -- It is wonderful how much time good people spend fighting the devil. If they would only expend the same amo