NetBSD Problem Report #60835
From www@netbsd.org Thu Oct 1 18:59:29 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 4BFB11A923B
for <gnats-bugs@gnats.NetBSD.org>; Thu, 1 Oct 2026 18:59:29 +0000 (UTC)
Message-Id: <20261001185928.734931A923C@mollari.NetBSD.org>
Date: Thu, 1 Oct 2026 18:59:28 +0000 (UTC)
From: tnn@nygren.pp.se
Reply-To: tnn@nygren.pp.se
To: gnats-bugs@NetBSD.org
Subject: grep {n} buggy in multibyte locale
X-Send-Pr-Version: www-1.0
X-From4GNATS: "tnn@nygren.pp.se via gnats" <gnats-admin@NetBSD.org>
>Number: 60835
>Category: bin
>Synopsis: grep {n} buggy in multibyte locale
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 01 19:00:00 +0000 2026
>Originator: Tobias Nygren
>Release: 11.99.8
>Organization:
>Environment:
>Description:
echo aa | LC_ALL=C grep -E '([a]|[b]){2}'
aa
echo aa | LC_ALL=en_US.UTF-8 grep -E '([a]|[b]){2}'
# prints nothing
>How-To-Repeat:
See description.
>Fix:
This bug was originally reported by Andreas Schwab from SUSE labs in 2006:
https://mail-archive.com/bug-grep@gnu.org/msg00594.html
SUSE at the time shipped a fix which we could consider using:
https://build.opensuse.org/projects/openSUSE:Evergreen:11.1/packages/grep/files/grep-2.5.1a-mbcset.diff
It shipped with 2.5.1a which is what we currently have so avoids later GPLv3 issues.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.