GNU bug report logs - #60708
pcre: improve support for linking with a library without unicode

Previous Next

Package: grep;

Reported by: Carlo Arenas <carenas <at> gmail.com>

Date: Tue, 10 Jan 2023 11:14:02 UTC

Severity: normal

Full log


Message #23 received at 60708 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Carlo Arenas <carenas <at> gmail.com>
Cc: Jim Meyering <jim <at> meyering.net>, 60708 <at> debbugs.gnu.org
Subject: Re: bug#60708: pcre: improve support for linking with a library
 without unicode
Date: Thu, 12 Jan 2023 19:38:52 -0800
[Message part 1 (text/plain, inline)]
On 1/11/23 20:03, Carlo Arenas wrote:
> Your suggested code doesn't address
> that, it merely changes the error message with one that would be IMHO
> even less clear and worsens the problem.

In that case let's improve the error message wording; something like the 
attached patch, say.


> Using a non Unicode PCRE library is perfectly fine, and there is no
> "undefined behavior" risk, and indeed `grep -P` without the UTF flag
> is exactly what the alternate path uses and what is recommended for
> speed, so?

It's not a question of undefined behavior. It's a question of whether 
grep does what the user requested. Without the attached patch, in a 
UTF-8 locale "grep -P '[[:alpha:]]'" won't report matching alphabetic 
characters, if they're multibyte. Silent misbehavior is quite bad, and 
it's better for grep to issue a diagnostic and exit than to silently do 
the wrong thing.
[0001-grep-diagnose-no-UTF-8-support-Bug-60708.patch (text/x-patch, attachment)]

This bug report was last modified 2 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.