grep-devel
[Top][All Lists]
Advanced

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

Re: Locale aware range expressions?


From: Paul Eggert
Subject: Re: Locale aware range expressions?
Date: Sun, 28 Jan 2024 18:31:20 -0800
User-agent: Mozilla Thunderbird

On 2024-01-28 07:17, arnold@skeeve.com wrote:
I think this is a bug in the documentation; the regex and dfa
libraries these days use Rational Range Interpretation(tm).

Paul, do you agree?

It depends on how 'grep' was built. If it was configured via './configure --with-included-regex', we get Rational Range Interpretation (RRI) behavior:

  $ printf '%s\n' d ḑ D Ḑ e E é É f ḟ F Ḟ | src/grep '[d-f]'
  d
  e
  f

However, I just checked, and both Fedora and Ubuntu grep use glibc's regex code which does not use RRI, so the behavior when LC_ALL='en_US.utf8' is:

  $ printf '%s\n' d ḑ D Ḑ e E é É f ḟ F Ḟ | grep '[d-f]'
  d
  ḑ
  e
  é
  f

One way to fix this would be to change glibc - what's been happening in that area?



reply via email to

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