GNU bug report logs -
#25495
WTF? Chmod (and presumably other coreutils) corrupt their own error messages with "smart" quotes...
Previous Next
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
Message #8 received at 25495 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
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.
>
> 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
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?
>
> Who came up with this? :-)
Coreutils has been doing this for years.
>
> Thanks for fixing this,
It's not obvious what needs to be fixed, without more details from your end.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
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.