bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [sed] bug when matching null bytes


From: Paolo Bonzini
Subject: Re: [sed] bug when matching null bytes
Date: Mon, 21 Aug 2006 19:12:31 +0200
User-agent: Thunderbird 1.5.0.5 (Macintosh/20060719)

Paul Eggert wrote:
I think I found a bug in GNU sed: The "." regular expression doesn't
match null bytes.
This is mandated by POSIX.
No, POSIX says that the input to sed must be a text file, and that
null bytes are not allowed in text files.  So if the input contains a
null byte, GNU 'sed' can do whatever it likes.  It will still conform
to POSIX even if "." matches a NUL byte.

In both GNU grep and GNU Emacs, "." matches a NUL byte, and there is a
strong argument that GNU "sed" should be consistent with other GNU
tools in this area.
Good.  Thanks then to Bert for reporting a real bug.

Paolo




reply via email to

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