X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4D7A455E.7060004@redhat.com> Date: Fri, 11 Mar 2011 08:53:02 -0700 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: 'tr' Bug References: <4D7A3FB8 DOT 3050004 AT tundraware DOT com> In-Reply-To: OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig5B849AD264356844518DA954" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enig5B849AD264356844518DA954 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/11/2011 08:34 AM, marco atzeri wrote: > $ echo /opt/IBN/df | tr [A-Z] [a-z] > /opt/ibn/df >=20 > $ uname -a > CYGWIN_NT-5.1 1.7.8(0.236/5/3) 2011-03-01 09:36 i686 Cygwin >=20 > $ set |grep LANG > LANG=3DC.UTF-8 One more thing to note. According to POSIX, tr '[A-Z]' '[a-z]' is only portable in the POSIX (aka C) locale. In all other locales, that behavior is unspecified (for example, [A-Z] is allowed to expand to AbBcC...yYzZ in locales that prefer that default collation is case-insensitive), and you instead have to use: tr '[:upper:]' '[:lower:]' according to POSIX. But then you run into problems with older Solaris tr that doesn't understand the newer POSIX wording, so in practice, the only multi-platform portable way to do case changing is to spell it out yourself: tr ABCDE...XYZ abcde...xyz --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig5B849AD264356844518DA954 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNekVeAAoJEKeha0olJ0NqDT0H/iY26Y+02af6B2G7cNXGn8z+ KMRDGGECuU6v1VCrgS95BCJ7ALCLqxyoqSdvU8kzuaJkd5i/eKmS9VtY19P2XIE0 s4HR42etoPQMWmir2lFH94rUqG5bI0g46sKfSZ1XA4i5gGQZAJAbMFaMm7mZPaKq VdOBFBOxcBdJ/6NffzjmKfgCOFf2UyZzjD4oEKXL0tQAD1sZLeVj7t5OKRIk/nNv dxcUXCwtllshTiLoOcTNtnrCQQwInbOsweYZvydy9cTIF6W64V0B1avjzli8ZaTK AZjhXhkb98L/XXCi2G5ixKK8IahGX5dwxzzlgcFIgCmwC0LPh1KlO9ODGBB7t0E= =F4WP -----END PGP SIGNATURE----- --------------enig5B849AD264356844518DA954--