bug-coreutils
[Top][All Lists]
Advanced

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

Re: Uppercase string: broken tr?


From: Bob Proulx
Subject: Re: Uppercase string: broken tr?
Date: Sun, 24 Aug 2003 14:16:28 -0600
User-agent: Mutt/1.3.28i

Bruno Haible wrote:
> Alex J. Dam wrote:
> >   $ echo 'ABÇ' | tr [:upper:] [:lower:]
> >   abÇ
> >   (the last character is an uppercase cedilla)
> >   I expecte its output to be:
> >   abç

What does 'locale' say in this case?

  locale

> > Am I doing something wrong?
> 
> No, your expectations match what POSIX specifies.

Does POSIX apply if you are not using a POSIX locale?

> > Is tr (version 2.1) broken?
> Yes, [...]
> > It happens with sed, too.
> Yes this seems like a bug in GNU sed 4.0.3.

But sed and tr and other utilities just use the locale data provided
on the system by glibc among other places.  These programs are table
driven by tables that are not part of these programs.  This is why
locale problems are global problems across the entire system of
programs such as grep, sed, awk, tr, etc. or anything else that uses
the locale data.

Bob




reply via email to

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