strange tr behaviour
Pav Lucistnik
pav at FreeBSD.org
Fri Mar 26 00:43:59 PST 2004
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Toto je =?iso-8859-2?Q?digit=E1ln=EC?=
=?ISO-8859-1?Q?_podepsan=E1?= =?iso-8859-2?Q?_=E8=E1st?=
=?ISO-8859-1?Q?_zpr=E1vy?=
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040326/e70682a0/attachment.bin
More information about the freebsd-current
mailing list