GNU bug report logs - #25495
WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes...

Previous Next

Package: coreutils;

Reported by: Alain Knaff <alain <at> knaff.lu>

Date: Fri, 20 Jan 2017 21:45:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#25495: closed (WTF? Chmod (and presumably other coreutils)
 corrupt their own error messages with "smart" quotes...)
Date: Sat, 21 Jan 2017 00:03:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 20 Jan 2017 16:01:57 -0800
with message-id <0c2da948-9365-8db4-5529-571b85135feb <at> cs.ucla.edu>
and subject line Re: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes...
has caused the debbugs.gnu.org bug report #25495,
regarding WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes...
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
25495: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25495
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alain Knaff <alain <at> knaff.lu>
To: bug-coreutils <at> gnu.org
Subject: WTF? Chmod (and presumably other coreutils) corrupt their own error
 messages with "smart" quotes...
Date: Fri, 20 Jan 2017 22:44:17 +0100
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


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alain Knaff <alain <at> knaff.lu>, Eric Blake <eblake <at> redhat.com>,
 25495-done <at> debbugs.gnu.org
Subject: Re: bug#25495: WTF? Chmod (and presumably other coreutils) corrupt
 their own error messages with "smart" quotes...
Date: Fri, 20 Jan 2017 16:01:57 -0800
Alain Knaff wrote:
> $ LC_ALL=C.UTF-8 chmod 0 ffff
> chmod: cannot access ‘ffff’: No such file or directory

It looks like you're using an old version of coreutils. The current version 
outputs ASCII apostrophes there. This was a change committed on 2015-11-04 and 
released in coreutils 8.25; it makes it easier to cut and paste file names from 
diagnostics into shells.

Since the reported behavior is already fixed I'm taking the liberty of closing 
the bug report.


This bug report was last modified 8 years and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.