From owner-freebsd-current@FreeBSD.ORG Fri Mar 26 00:48:18 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CF2016A4CE for ; Fri, 26 Mar 2004 00:48:18 -0800 (PST) Received: from cmsrelay03.mx.net (cmsrelay03.mx.net [165.212.11.112]) by mx1.FreeBSD.org (Postfix) with SMTP id 23ADA43D3F for ; Fri, 26 Mar 2004 00:48:18 -0800 (PST) (envelope-from noackjr@alumni.rice.edu) Received: from cmsapps01.cms.usa.net (165.212.11.136) by cmsoutbound.mx.net with SMTP; 26 Mar 2004 08:48:17 -0000 Received: from optimator.noacks.org [65.69.2.212] by cmsapps01.cms.usa.net (ASMTP/noackjr@usa.net) via mtad (C8.MAIN.3.13N) with ESMTP id 896icZiWo0128M36; Fri, 26 Mar 2004 08:48:14 GMT X-USANET-Auth: 65.69.2.212 AUTH noackjr@usa.net optimator.noacks.org Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 6075D6103; Fri, 26 Mar 2004 02:48:13 -0600 (CST) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05860-07-2; Fri, 26 Mar 2004 02:48:12 -0600 (CST) Received: from alumni.rice.edu (compgeek [192.168.1.10]) by optimator.noacks.org (Postfix) with ESMTP id 5801A60FC; Fri, 26 Mar 2004 02:48:12 -0600 (CST) Message-ID: <4063EE4E.3090102@alumni.rice.edu> Date: Fri, 26 Mar 2004 02:48:14 -0600 From: Jon Noack User-Agent: Mozilla Thunderbird 0.5+ (Windows/20040312) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Reifenberger References: <20040326085219.T24707@fw.reifenberger.com> In-Reply-To: <20040326085219.T24707@fw.reifenberger.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: by amavisd-new at noacks.org Content-Transfer-Encoding: quoted-printable cc: freebsd-current@freebsd.org Subject: Re: strange tr behaviour X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2004 08:48:18 -0000 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