tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-04 Thread Gerald Pfeifer
I've been using tr '[:upper:]' '[:lower:]' for a while, but with version 6.9.90 (and 6.9.91) I know get the following hard error: [EMAIL PROTECTED]:~> echo 'AbCd' | tr '[:lower:]' '[:upper:]' ABCD [EMAIL PROTECTED]:~> echo 'AbCd' | tr '[:upper:]' '[:lower:]' tr: misaligned [:upper:] an

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-05 Thread Jim Meyering
Gerald Pfeifer <[EMAIL PROTECTED]> wrote: > I've been using tr '[:upper:]' '[:lower:]' for a while, but with > version 6.9.90 (and 6.9.91) I know get the following hard error: > > [EMAIL PROTECTED]:~> echo 'AbCd' | tr '[:lower:]' '[:upper:]' > ABCD > > [EMAIL PROTECTED]:~> echo 'AbCd' | tr

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-05 Thread James Youngman
On Jan 5, 2008 9:01 AM, Jim Meyering <[EMAIL PROTECTED]> wrote: > > That machine is running in an ISO-8859 locale on openSUSE 11.0 FACTORY: I can reproduce the problem on Debian (Lenny; version 2.7-3 of the locales package with LANG=en_US.iso-8859-1). > That locale definition has 3 more upper-cas

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-05 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Gerald Pfeifer <[EMAIL PROTECTED]> wrote: >> I've been using tr '[:upper:]' '[:lower:]' for a while, but with >> version 6.9.90 (and 6.9.91) I know get the following hard error: >> >> [EMAIL PROTECTED]:~> echo 'AbCd' | tr '[:lower:]' '[:upper:]' >> A

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-05 Thread Jim Meyering
Thanks again. My tentative patch introduced a bug (see the tests). Here's the fix I've just pushed: Avoid tr case-conversion failure in some locales. * src/tr.c (skip_construct): New function. (main): When processing a pair of case-converting classes, don't iterate

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-05 Thread James Youngman
On Jan 5, 2008 11:34 PM, Jim Meyering <[EMAIL PROTECTED]> wrote: > diff --git a/NEWS b/NEWS > index 5285d51..5b1b366 100644 > --- a/NEWS > +++ b/NEWS > @@ -2,6 +2,12 @@ GNU coreutils NEWS-*- > outline -*- > > * Noteworthy changes in release 6.? (-??-??) [?]

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-06 Thread Jim Meyering
"James Youngman" <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 9:01 AM, Jim Meyering <[EMAIL PROTECTED]> wrote: >> > That machine is running in an ISO-8859 locale on openSUSE 11.0 FACTORY: > > I can reproduce the problem on Debian (Lenny; version 2.7-3 of the > locales package with LANG=en_US.iso-885

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-06 Thread Gerald Pfeifer
On Sun, 6 Jan 2008, Jim Meyering wrote: > My tentative patch introduced a bug (see the tests). > Here's the fix I've just pushed: Wow. Tanks a lot for the quick and helpful response Jim (and James). You see me (positively) impressed. :-) Gerald ___

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-07 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Meyering wrote: > Here's a tentative patch that also avoids repeated > (and wasteful) initialization of the xlate array. I note that POSIX requires that, in the case that the arguments are exactly '[:lower:]' and '[:upper:]' (or the reverse of the

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-07 Thread Jim Meyering
Micah Cowan <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> Here's a tentative patch that also avoids repeated >> (and wasteful) initialization of the xlate array. > > I note that POSIX requires that, in the case that the arguments are > exactly '[:lower:]' and '[:upper:]' (or the reverse of th

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-10 Thread Jim Meyering
"James Youngman" <[EMAIL PROTECTED]> wrote: > On Jan 5, 2008 11:34 PM, Jim Meyering <[EMAIL PROTECTED]> wrote: >> diff --git a/NEWS b/NEWS >> index 5285d51..5b1b366 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -2,6 +2,12 @@ GNU coreutils NEWS-*- >> outline -*- >> >

Re: tr '[:upper:]' '[:lower:]' -- misaligned construct

2008-01-10 Thread Pádraig Brady
Jim Meyering wrote: > "James Youngman" <[EMAIL PROTECTED]> wrote: > >> On Jan 5, 2008 11:34 PM, Jim Meyering <[EMAIL PROTECTED]> wrote: >>> diff --git a/NEWS b/NEWS >>> index 5285d51..5b1b366 100644 >>> --- a/NEWS >>> +++ b/NEWS >>> @@ -2,6 +2,12 @@ GNU coreutils NEWS