bug-coreutils
[Top][All Lists]
Advanced

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

Re: Limit the spew of error messages resulting from "wc /bin/sh"


From: James Youngman
Subject: Re: Limit the spew of error messages resulting from "wc /bin/sh"
Date: Fri, 25 May 2007 14:26:18 +0100

On 5/23/07, Jim Meyering <address@hidden> wrote:
"James Youngman" <address@hidden> wrote:
> On 5/22/07, Paul Eggert <address@hidden> wrote:
>> Hmmm, why does "wc" output _any_ such messages?  The standard doesn't
>> require them and they seem like a waste of time.  An invalid byte
>> should not count as part of a character or a word, but should count as
>> a byte and as part of a line.
>
> I think I agree, but I was trying to be a little cautious.  Unless I
> hear an objection in the next day or so, I'll rework the patch on the
> lines you suggest.

I agree.  Thanks for working on that.

Here is the (rather trivial) patch.    The ChangeLog entry is provided
inline, but it is also present at the head of the patch, which appears
as an attachment.

2007-05-25  James Youngman  <address@hidden>

       * src/wc.c (wc): Don't issue an error message when mbrtowc
         indicates that we have seen an invalid byte sequence.  This
         makes "wc /bin/sh" bearable (though the word and line counts
         are likely not to be useful).

James.

Attachment: coreutils-wc-mberr-ign.patch
Description: Text Data


reply via email to

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