Re: weird tr output with czech locale

From: Andrey Chernov <ache_at_nagual.pp.ru>
Date: Sat, 1 Nov 2003 00:37:24 +0300
On Fri, Oct 31, 2003 at 10:06:50PM +0100, Pav Lucistnik wrote:
> Hi,
> 
> strange thing is happening here on two week old -CURRENT world.
> This simple command:
> 
> $ echo CATALOG | tr 'a-z' 'A-Z'
> CATALOG
> 
> but
> 
> $ echo CATALOG | LANG=cs_CZ.ISO8859-2 tr 'a-z' 'A-Z'
> bA?Ak?f

It is incorrect tr usage (a-z range length and letters sequence is not
equal to A-Z range length and letters sequence for cs_CZ locale, see cs_CZ
locale data definition). Correct usage will be

LANG=cs_CZ.ISO8859-2 tr '[:lower:]' '[:upper:]'

or

LANG=C tr 'a-z' 'A-Z'


-- 
Andrey Chernov | http://ache.pp.ru/

Received on Fri Oct 31 2003 - 12:37:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:27 UTC