Re: strange tr behaviour

From: Jon Noack <noackjr_at_alumni.rice.edu>
Date: Fri, 26 Mar 2004 02:48:14 -0600
On 3/26/2004 2:00 AM, Michael Reifenberger wrote:
> 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Ŭ]
> 
> but:
> 
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[:lower:]' '[:upper:]'
> ABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> AND:
> 
> # unsetenv LC_ALL
> # unsetenv LC_CTYPE
> # unsetenv LANG
> # echo "abcdefghijklmnopqrstuvwxyz" | tr '[a-z]' '[A-Z]'
> ABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> 
> ?!?
> Anyone else?
> Anyone any clue?

Short version:
tr(1) was modified to be POSIX compliant for 5.x.  You are seeing 
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.html#19705

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

The solution:
http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019725.html

Jon
Received on Thu Mar 25 2004 - 23:48:18 UTC

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