Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Bruno Haible
Jim Meyering wrote: > I've also made this tiny additional change: > > LC_ALL=en_US.UTF-8 printf "\\351" 2>/dev/null \ > - | LC_ALL=C tr "\\351" x | LC_ALL=C grep x > /dev/null \ > + | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \ >|| exit 1 > printf "\\351" 2>/dev/null \ > - |

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Jim Meyering
On Thu, Dec 26, 2019 at 3:24 PM Bruno Haible wrote: > > Hi Jim, > > > Would you please amend into it the attached grammar tweak > > (subjunctive) and change to avoid crossing the 80-byte line length > > limits: > > Done, and also implemented Paul's suggestion. > > Regarding the grammar: I wasn't a

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Bruno Haible
Hi Jim, > Would you please amend into it the attached grammar tweak > (subjunctive) and change to avoid crossing the 80-byte line length > limits: Done, and also implemented Paul's suggestion. Regarding the grammar: I wasn't aware of this "weird quirk in English language" [1]. [1] https://www.e

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Jim Meyering
On Thu, Dec 26, 2019 at 10:11 AM Bruno Haible wrote: > > Here's a slightly tighter test, albeit relying on tr working with octals: > > > > case `LC_ALL=en_US.UTF-8 printf '\351'| tr '\351' x` in x) ;; *) exit 1;; > > esac > > You're right, it's probably better to rely on 'tr' than on 'od'. Hi

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Jim Meyering
On Thu, Dec 26, 2019 at 9:45 AM Paul Eggert wrote: > On 12/26/19 3:32 AM, Bruno Haible wrote: > > The respawning condition > > in init.sh lines 159..175 could be extended to include printf '\351'. > > I've verified that the attached patch fixes the two reported tests from the > > 'grep' test suite

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Bruno Haible
Hi Jim, > Here's a slightly tighter test, albeit relying on tr working with octals: > > case `LC_ALL=en_US.UTF-8 printf '\351'| tr '\351' x` in x) ;; *) exit 1;; > esac You're right, it's probably better to rely on 'tr' than on 'od'. Find attached an updated proposed patch. > Also, with arc

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Paul Eggert
On 12/26/19 3:32 AM, Bruno Haible wrote: > The respawning condition > in init.sh lines 159..175 could be extended to include printf '\351'. > I've verified that the attached patch fixes the two reported tests from the > 'grep' test suite. Thanks, this is a better suggestion. However, it tests prin

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Jim Meyering
On Thu, Dec 26, 2019 at 3:32 AM Bruno Haible wrote: > > I'm thinking we should install the attached patch into Gnulib. The basic > > idea is > > that running these test scripts in random locales is likely more trouble > > than > > it's worth. > > No no no. Applied to grep's init.sh, it would red

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Bruno Haible
Hi Paul, > I'm thinking we should install the attached patch into Gnulib. The basic idea > is > that running these test scripts in random locales is likely more trouble than > it's worth. No no no. Applied to grep's init.sh, it would reduce the test coverage of grep. But applied to gnulib's init

Re: [PATCH] mbrtowc: port better to narrow-wchar_t platforms

2019-12-26 Thread Bruno Haible
Paul Eggert wrote: > wchar_t is too narrow to represent all the Unicode characters, > consider a byte sequence for an out-of-wchar_t-range character to > be an encoding error. Thanks. I had not thought about 16-bit wchar_t when writing this code. For supporting full Unicode on AIX and Windows pla

Re: grep-3.3.42-088f test results on AIX

2019-12-26 Thread Paul Eggert
On 12/26/19 1:16 AM, Bruno Haible wrote: > Setting LC_ALL=C in the test setup greatly reduces the test coverage. As far > as > I can see, so far, all the grep tests that work on plain ASCII inputs and > patterns were tested in the locale the user happens to be in. But with your > patch, these test

[PATCH] mbrtowc: port better to narrow-wchar_t platforms

2019-12-26 Thread Paul Eggert
* lib/mbrtowc.c (mbrtowc): On platforms like AIX 7.2, where wchar_t is too narrow to represent all the Unicode characters, consider a byte sequence for an out-of-wchar_t-range character to be an encoding error. This fixes grep’s surrogate-pair test failure on AIX 7.2. --- ChangeLog | 9 +