Re: strange tr behaviour

From: Pav Lucistnik <pav_at_FreeBSD.org>
Date: Fri, 26 Mar 2004 09:43:56 +0100
V pá, 26. 03. 2004 v 09:00, Michael Reifenberger píąe:

> Hi,
> under -current with the following env settings:
> 	LC_ALL=de_DE.ISO8859-15
> 	LC_CTYPE=de_DE.ISO8859-15
> 	LANG=de_DE.ISO8859-15
> using tr as follows I get:
> 
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[a-z]' '[A-Z]'
> ABCDEFGHIJKLMNOPQRSUÚWXYÝ]

correct

> but:
> 
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[:lower:]' '[:upper:]'
> ABCDEFGHIJKLMNOPQRSTUVWXYZ

correct

> AND:
> 
> # unsetenv LC_ALL
> # unsetenv LC_CTYPE
> # unsetenv LANG
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[a-z]' '[A-Z]'
> ABCDEFGHIJKLMNOPQRSTUVWXYZ

correct

> ?!?
> Anyone else?
> Anyone any clue?

Everything works as expected, what's the problem?

You can't abuse [a-z] [A-Z] for uppercasing of string.

-- 
Pav Lucistnik <pav_at_oook.cz>
              <pav_at_FreeBSD.org>

Is this a dagger which I see before me, its handle towards my hand?
Come, let me clutch thee! I have thee not, and yet I see thee still.

Received on Thu Mar 25 2004 - 23:43:59 UTC

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