From unknown Sat Jun 21 03:28:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes... Resent-From: Alain Knaff Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 20 Jan 2017 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25495 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 25495@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.148494867818559 (code B ref -1); Fri, 20 Jan 2017 21:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jan 2017 21:44:38 +0000 Received: from localhost ([127.0.0.1]:36705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUgz8-0004pH-JK for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUgz7-0004p3-8k for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUgz0-0007vX-Qt for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:32 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cUgz0-0007vT-NY for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUgyy-0005Wj-BW for bug-coreutils@gnu.org; Fri, 20 Jan 2017 16:44:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUgyv-0007uA-8p for bug-coreutils@gnu.org; Fri, 20 Jan 2017 16:44:28 -0500 Received: from www.lll.lu ([80.92.79.81]:36179 helo=lll.lu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cUgyu-0007r0-Uj for bug-coreutils@gnu.org; Fri, 20 Jan 2017 16:44:25 -0500 X-Envelope-To: Received: from [192.168.1.11] (ip-87-240-245-6.dyn.luxdsl.pt.lu [87.240.245.6] (may be forged)) (authenticated bits=0) by lll.lu (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v0KLiHvB008709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 20 Jan 2017 22:44:19 +0100 From: Alain Knaff Message-ID: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> Date: Fri, 20 Jan 2017 22:44:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Hi, Recently, while browsing error mails of some cron jobs, I noticed that chmod puts "smart" quotes into its error messages. IMHO, such gimmicks should have no place in core utilities. At least this behavior should be optional via configuration or environment setting (preferably off by default). The faulty code lives in lib/quotearg.c in function gettext_quote Even defining a custom locale that just maps quotes to themselves doesn't work, because this function specifically tests for that case (translation same as msgid), and then "manually" garbles the quotes. Who came up with this? :-) Thanks for fixing this, Alain From unknown Sat Jun 21 03:28:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes... Resent-From: Eric Blake Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 20 Jan 2017 22:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25495 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Alain Knaff , 25495@debbugs.gnu.org Received: via spool by 25495-submit@debbugs.gnu.org id=B25495.148495162429443 (code B ref 25495); Fri, 20 Jan 2017 22:34:02 +0000 Received: (at 25495) by debbugs.gnu.org; 20 Jan 2017 22:33:44 +0000 Received: from localhost ([127.0.0.1]:36727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUhke-0007ep-Au for submit@debbugs.gnu.org; Fri, 20 Jan 2017 17:33:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUhkc-0007eb-7Y for 25495@debbugs.gnu.org; Fri, 20 Jan 2017 17:33:42 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 26E9FC057EC9; Fri, 20 Jan 2017 22:33:37 +0000 (UTC) Received: from [10.10.117.52] (ovpn-117-52.rdu2.redhat.com [10.10.117.52]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0KMXZx8020617; Fri, 20 Jan 2017 17:33:36 -0500 References: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: Date: Fri, 20 Jan 2017 16:33:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1skH8o5006jiJifS2W0mDMFrbQGrg8Qq5" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 20 Jan 2017 22:33:37 +0000 (UTC) X-Spam-Score: -8.2 (--------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1skH8o5006jiJifS2W0mDMFrbQGrg8Qq5 Content-Type: multipart/mixed; boundary="KA7k2jOC8a52MKO5bQNvWfcWoVmw8aB67"; protected-headers="v1" From: Eric Blake To: Alain Knaff , 25495@debbugs.gnu.org Message-ID: Subject: Re: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes... References: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> In-Reply-To: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> --KA7k2jOC8a52MKO5bQNvWfcWoVmw8aB67 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/20/2017 03:44 PM, Alain Knaff wrote: > Hi, >=20 > Recently, while browsing error mails of some cron jobs, I noticed that > chmod puts "smart" quotes into its error messages. >=20 > IMHO, such gimmicks should have no place in core utilities. >=20 > At least this behavior should be optional via configuration or > environment setting (preferably off by default). It IS configurable by environment variables: set LC_ALL=3DC as a sledgehammer to turn it (and all other localization aspects) off. You can also use LC_MESSAGES and fine-tune the creation of a custom one-off locale if you don't like the behavior of your current locale. >=20 > The faulty code lives in lib/quotearg.c in function gettext_quote >=20 > Even defining a custom locale that just maps quotes to themselves > doesn't work, because this function specifically tests for that case > (translation same as msgid), and then "manually" garbles the quotes. Can you please paste an example of something that's actually garbled? Or is this merely a case of you mixing locales (where the coreutils are producing output in one locale/encoding, but your other tools are post-processing the data in another locale/encoding), where the garbling is a result of your mismatched locales? >=20 > Who came up with this? :-) Coreutils has been doing this for years. >=20 > Thanks for fixing this, It's not obvious what needs to be fixed, without more details from your e= nd. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --KA7k2jOC8a52MKO5bQNvWfcWoVmw8aB67-- --1skH8o5006jiJifS2W0mDMFrbQGrg8Qq5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYgpA+AAoJEKeha0olJ0NqSG4H+wZTCUsEGr80osT+4uikrCyb DDHT/P96tKLq8t0cLDWKZLbCnqqfLF5eTe2xrKI7TqWaxjVe0Zn9093WHlKZXBuP fUhDnTv/zYwhbVWjtxfcVPMfETTk8xSdZptqRAHjj9zFRLpIcdWbYW9vbYj81pou KCFgp1pCsn2I40IXBlbJ4PjdiBi/Z/PYnZbAx/V/AYTYzjXm6rtDQGCUsFMNo0SM EceF8c7JXEGMVMsYw4wnnlx1d42WC4R1V1muZKZ4jwc+zt8v9/SQOnVbLanWr5Hn g6Llpez+zP4NIRUmgfTFkIznLPTVVua1HDu0Vn2rlJmobcHTlji06bbt/8gcoE4= =gcLb -----END PGP SIGNATURE----- --1skH8o5006jiJifS2W0mDMFrbQGrg8Qq5-- From unknown Sat Jun 21 03:28:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes... Resent-From: Alain Knaff Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 20 Jan 2017 23:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25495 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Eric Blake , 25495@debbugs.gnu.org Received: via spool by 25495-submit@debbugs.gnu.org id=B25495.148495314431616 (code B ref 25495); Fri, 20 Jan 2017 23:00:02 +0000 Received: (at 25495) by debbugs.gnu.org; 20 Jan 2017 22:59:04 +0000 Received: from localhost ([127.0.0.1]:36734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUi9A-0008Ds-Gw for submit@debbugs.gnu.org; Fri, 20 Jan 2017 17:59:04 -0500 Received: from www.lll.lu ([80.92.79.81]:44241 helo=lll.lu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUi97-0008DM-Vf for 25495@debbugs.gnu.org; Fri, 20 Jan 2017 17:59:02 -0500 Received: from [192.168.1.11] (ip-87-240-245-6.dyn.luxdsl.pt.lu [87.240.245.6] (may be forged)) (authenticated bits=0) by lll.lu (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v0KMwsHG012400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Jan 2017 23:58:55 +0100 References: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> From: Alain Knaff Message-ID: Date: Fri, 20 Jan 2017 23:58:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On 01/20/2017 23:33, Eric Blake wrote: > On 01/20/2017 03:44 PM, Alain Knaff wrote: >> Hi, >> >> Recently, while browsing error mails of some cron jobs, I noticed that >> chmod puts "smart" quotes into its error messages. >> >> IMHO, such gimmicks should have no place in core utilities. >> >> At least this behavior should be optional via configuration or >> environment setting (preferably off by default). > > It IS configurable by environment variables: set LC_ALL=C as a Doesn't help, as long as I still need UTF-8: $ LC_ALL=C.UTF-8 chmod 0 ffff chmod: cannot access ‘ffff’: No such file or directory With just C, it does indeed work: > LC_ALL=C chmod 0 ffff chmod: cannot access 'ffff': No such file or directory ... but in that case, I'd get (obviously...) trouble getting proper alignment in ls or vi when working with data containing unicode characters. > sledgehammer to turn it (and all other localization aspects) off. You > can also use LC_MESSAGES and fine-tune the creation of a custom one-off LC_MESSAGES doesn't do anything (if set to C): $ LC_MESSAGES=C chmod 0 ffff chmod: cannot access ‘ffff’: No such file or directory ... or is C only for LC_ALL, and LC_MESSAGES needs a different value? > locale if you don't like the behavior of your current locale. > >> >> The faulty code lives in lib/quotearg.c in function gettext_quote >> >> Even defining a custom locale that just maps quotes to themselves >> doesn't work, because this function specifically tests for that case >> (translation same as msgid), and then "manually" garbles the quotes. > > Can you please paste an example of something that's actually garbled? Or See examples above... or again: $ chmod 0 ffff chmod: cannot access ‘ffff’: No such file or directory > is this merely a case of you mixing locales (where the coreutils are > producing output in one locale/encoding, but your other tools are > post-processing the data in another locale/encoding), where the garbling > is a result of your mismatched locales? Nope, it also happens with just coreutils alone. > >> >> Who came up with this? :-) > > Coreutils has been doing this for years. > Ok, so you've managed to sneak this past us for some years. Still doesn't make it right :-( >> >> Thanks for fixing this, > > It's not obvious what needs to be fixed, without more details from your end. > Regards, Alain From unknown Sat Jun 21 03:28:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alain Knaff Subject: bug#25495: closed (Re: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes...) Message-ID: References: <0c2da948-9365-8db4-5529-571b85135feb@cs.ucla.edu> <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> X-Gnu-PR-Message: they-closed 25495 X-Gnu-PR-Package: coreutils Reply-To: 25495@debbugs.gnu.org Date: Sat, 21 Jan 2017 00:03:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1484956982-4954-1" This is a multi-part message in MIME format... ------------=_1484956982-4954-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25495: WTF? Chmod (and presumably other coreutils) corrupt their own error= messages with "smart" quotes... which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25495@debbugs.gnu.org. --=20 25495: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25495 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1484956982-4954-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25495-done) by debbugs.gnu.org; 21 Jan 2017 00:02:06 +0000 Received: from localhost ([127.0.0.1]:36760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUj8A-0001Gi-I6 for submit@debbugs.gnu.org; Fri, 20 Jan 2017 19:02:06 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUj89-0001GE-1I for 25495-done@debbugs.gnu.org; Fri, 20 Jan 2017 19:02:05 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D6409160085; Fri, 20 Jan 2017 16:01:58 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id K2GEHmJbY8o1; Fri, 20 Jan 2017 16:01:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 334C616008C; Fri, 20 Jan 2017 16:01:58 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nJ3NEjzqrZ2X; Fri, 20 Jan 2017 16:01:58 -0800 (PST) Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 11ACD160085; Fri, 20 Jan 2017 16:01:58 -0800 (PST) Subject: Re: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes... To: Alain Knaff , Eric Blake , 25495-done@debbugs.gnu.org References: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <0c2da948-9365-8db4-5529-571b85135feb@cs.ucla.edu> Date: Fri, 20 Jan 2017 16:01:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25495-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Alain Knaff wrote: > $ LC_ALL=3DC.UTF-8 chmod 0 ffff > chmod: cannot access =E2=80=98ffff=E2=80=99: No such file or directory It looks like you're using an old version of coreutils. The current versi= on=20 outputs ASCII apostrophes there. This was a change committed on 2015-11-0= 4 and=20 released in coreutils 8.25; it makes it easier to cut and paste file name= s from=20 diagnostics into shells. Since the reported behavior is already fixed I'm taking the liberty of cl= osing=20 the bug report. ------------=_1484956982-4954-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Jan 2017 21:44:38 +0000 Received: from localhost ([127.0.0.1]:36705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUgz8-0004pH-JK for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cUgz7-0004p3-8k for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUgz0-0007vX-Qt for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:32 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cUgz0-0007vT-NY for submit@debbugs.gnu.org; Fri, 20 Jan 2017 16:44:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUgyy-0005Wj-BW for bug-coreutils@gnu.org; Fri, 20 Jan 2017 16:44:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUgyv-0007uA-8p for bug-coreutils@gnu.org; Fri, 20 Jan 2017 16:44:28 -0500 Received: from www.lll.lu ([80.92.79.81]:36179 helo=lll.lu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cUgyu-0007r0-Uj for bug-coreutils@gnu.org; Fri, 20 Jan 2017 16:44:25 -0500 X-Envelope-To: Received: from [192.168.1.11] (ip-87-240-245-6.dyn.luxdsl.pt.lu [87.240.245.6] (may be forged)) (authenticated bits=0) by lll.lu (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v0KLiHvB008709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 20 Jan 2017 22:44:19 +0100 To: bug-coreutils@gnu.org From: Alain Knaff Subject: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes... Message-ID: <04f08511-1056-51a4-9237-99fa5b23cbea@knaff.lu> Date: Fri, 20 Jan 2017 22:44:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Hi, Recently, while browsing error mails of some cron jobs, I noticed that chmod puts "smart" quotes into its error messages. IMHO, such gimmicks should have no place in core utilities. At least this behavior should be optional via configuration or environment setting (preferably off by default). The faulty code lives in lib/quotearg.c in function gettext_quote Even defining a custom locale that just maps quotes to themselves doesn't work, because this function specifically tests for that case (translation same as msgid), and then "manually" garbles the quotes. Who came up with this? :-) Thanks for fixing this, Alain ------------=_1484956982-4954-1--