-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Saïvann on 3/31/2009 9:42 AM: > I used tr to filter locale names in a debian package but I got a problem > with a specific field. When using tr with "-s", it removes a "n" in > "nn-NO". You can reproduce this bug simply with this command in a terminal : > > echo "nn-NO" | tr -s A-Z a-z > > The bug is not reproducible with this command : > > echo "nn-NO" | tr A-Z a-z
Not a bug. That is the documented behavior of -s, per 'tr --help': | -s, --squeeze-repeats replace each input sequence of a repeated character | that is listed in SET1 with a single occurrence | of that character ... | -s uses SET1 if not | translating nor deleting; else squeezing uses SET2 and occurs after | translation or deletion. Since n is a member of SET2, it is squeezed after the translation phase, regardless of whether translation was what caused the creation of a consecutive nn. > I don't know if that is intended but it looks like a bug. I'm currently > using coreutils 6.10-6ubuntu1 on ubuntu. Consider upgrading. The latest stable version is 7.2. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknSSSIACgkQ84KuGfSFAYBiKQCgv9jMQx3eI6QUyWZ2nUYRje0m t5MAoJym//Iwnwa2tL1zptPAHrHf2XYh =BrF5 -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils