Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2004 02:48:14 -0600
From:      Jon Noack <noackjr@alumni.rice.edu>
To:        Michael Reifenberger <mike@Reifenberger.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: strange tr behaviour
Message-ID:  <4063EE4E.3090102@alumni.rice.edu>
In-Reply-To: <20040326085219.T24707@fw.reifenberger.com>
References:  <20040326085219.T24707@fw.reifenberger.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/26/2004 2:00 AM, Michael Reifenberger wrote:
> Hi,
> under -current with the following env settings:
> 	LC_ALL=3Dde_DE.ISO8859-15
> 	LC_CTYPE=3Dde_DE.ISO8859-15
> 	LANG=3Dde_DE.ISO8859-15
> using tr as follows I get:
>=20
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[a-z]' '[A-Z]'
> ABCDEFGHIJKLMNOPQRSU=DAWXY=DD]
>=20
> but:
>=20
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[:lower:]' '[:upper:]'
> ABCDEFGHIJKLMNOPQRSTUVWXYZ
>=20
> AND:
>=20
> # unsetenv LC_ALL
> # unsetenv LC_CTYPE
> # unsetenv LANG
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[a-z]' '[A-Z]'
> ABCDEFGHIJKLMNOPQRSTUVWXYZ
>=20
>=20
> ?!?
> Anyone else?
> Anyone any clue?

Short version:
tr(1) was modified to be POSIX compliant for 5.x.  You are seeing=20
correct behavior.  See the solution below.

This was discussed back in January as "Weird locale troubles (?!)":
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/thread.ht=
ml#19705

The high points:
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019705.ht=
ml
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019723.ht=
ml
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019732.ht=
ml
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019826.ht=
ml
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019720.ht=
ml

The solution:
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019725.ht=
ml

Jon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4063EE4E.3090102>