From owner-freebsd-stable@FreeBSD.ORG Fri Feb 3 21:13:29 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0DC416A420 for ; Fri, 3 Feb 2006 21:13:29 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CB3C43D46 for ; Fri, 3 Feb 2006 21:13:28 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id k13LDRnM090472; Fri, 3 Feb 2006 15:13:28 -0600 (CST) (envelope-from dan) Date: Fri, 3 Feb 2006 15:13:27 -0600 From: Dan Nelson To: Martin Message-ID: <20060203211327.GF38470@dan.emsphone.com> References: <43E3B356.7030203@nurfuerspam.de> <20060203200036.GE38470@dan.emsphone.com> <43E3BBBF.4000702@nurfuerspam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <43E3BBBF.4000702@nurfuerspam.de> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: stable@freebsd.org Subject: Re: tr(1) buggy with de_DE.ISO8859-1(5) locale? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2006 21:13:29 -0000 In the last episode (Feb 03), Martin said: > Dan Nelson wrote: > >See the "tr" manpage, especially the EXAMPLES and COMPATIBILITY > >sections. > > From tr(1) COMPATIBILITY: > > "Since tr now obeys the locale's collation order, this idiom may not > produce correct results when there is not a 1:1 mapping between lower > and upper case" > > Does this mean that because there is no 1:1 mapping of > lower/uppercase "ß", I will never be able to use ranges like "tr s-w > S-W"? tr uses the collation sequence when expanding ranges, so the real problem is that the lowercase range "s-w" expands to "sßtuúùûüvw", and the uppercase range "S-W" expands to "STUÚÙÛÜVW", which is a smaller set. An alternative would be to use "tr stuvw STUVW" or "tr stuúùûüvw STUÚÙÛÜVW". -- Dan Nelson dnelson@allantgroup.com