From: arnold@skeeve.com
To: noritnk@kcn.ne.jp, jim@meyering.net, grep-devel@gnu.org,
bug-gnulib@gnu.org, atler@pld-linux.org
Cc: sed-devel@gnu.org
Subject: Re: [Grep-devel] Changed behavior in sed 4.6
Date: Thu, 20 Dec 2018 22:13:26 -0700 [thread overview]
Message-ID: <201812210513.wBL5DQUU022671@freefriends.org> (raw)
In-Reply-To: <CA+8g5KFKAiM+BKxX+xCD4FbuN1aitmm5BPTqen0kSsVBzf3gkw@mail.gmail.com>
Jim Meyering <jim@meyering.net> wrote:
> On Thu, Dec 20, 2018 at 2:49 PM Jan Palus <atler@pld-linux.org> wrote:
> > I've just happened to notice a difference in behavior between sed 4.5 and 4.6
> > when building VirtualBox. It seems to be locale dependent:
> >
> > $ echo 'foo(bar '|LC_ALL=C sed -e 's/\([^*] *\)\bbar\b/\1foo */g'
> > foo(bar
> >
> > $ echo 'foo(bar '|LC_ALL=C.UTF-8 sed -e 's/\([^*] *\)\bbar\b/\1foo */g'
> > foo(foo *
> >
> > In 4.5 both results are the same -- same as the second output with
> > LC_ALL=C.UTF-8.
>
> Thanks a lot for that report.
> This is indeed a regression. It also affects the just-release
> grep-3.2, since the source is in a file used by both: gnulib's dfa.c.
> I tracked it down to this gnulib/lib/dfa.c commit: v0.1-2213-gae4b73e28
> To back that out, I must first revert part of this fix-up patch:
> v0.1-2281-g95cd86dd7
>
> Here's a demonstrator with grep: (it should match, but with 3.2, does not):
>
> $ echo 123-x|LC_ALL=C grep '.\bx'
> $
>
> To avoid the failure, one can:
> - specify -P (for PCRE, a different matcher), or
> - don't use the C locale, but rather use a multi-byte locale like the
> one you chose, which inhibits use of the DFA matcher, because \b's
> definition requires multi-byte aware machinery not present in the DFA
> matcher.
>
> I expect to revert the mentioned mentioned gnulib commits, and then to
> make new releases of both grep and sed.
Please add a test case ...
THanks,
Arnold
next prev parent reply other threads:[~2018-12-21 5:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181220184119.3jb6iakjsmeatja3@kalarepa>
2018-12-21 3:27 ` Changed behavior in sed 4.6 Jim Meyering
2018-12-21 5:13 ` arnold [this message]
2018-12-21 5:18 ` [Grep-devel] " Jim Meyering
2018-12-21 5:30 ` Jim Meyering
2018-12-21 5:35 ` Jim Meyering
2018-12-21 9:19 ` arnold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201812210513.wBL5DQUU022671@freefriends.org \
--to=arnold@skeeve.com \
--cc=atler@pld-linux.org \
--cc=bug-gnulib@gnu.org \
--cc=grep-devel@gnu.org \
--cc=jim@meyering.net \
--cc=noritnk@kcn.ne.jp \
--cc=sed-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).