GNU bug report logs - #32236
df header corrupted with LANG=zh_TW.UTF-8 on macOS

Previous Next

Package: coreutils;

Reported by: Chih-Hsuan Yen <yan12125 <at> gmail.com>

Date: Sat, 21 Jul 2018 16:10:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


Message #53 received at 32236 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, Chih-Hsuan Yen <yan12125 <at> gmail.com>,
 Bruno Haible <bruno <at> clisp.org>
Cc: bug-gnulib <bug-gnulib <at> gnu.org>, 32236 <at> debbugs.gnu.org
Subject: Re: bug#32236: df header corrupted with LANG=zh_TW.UTF-8 on macOS
Date: Thu, 26 Jul 2018 10:34:47 -0700
On 26/07/18 02:01, Paul Eggert wrote:
> Chih-Hsuan Yen wrote:
>> How about following the idea from Pádraig Brady
>> and filter \n only?
> 
> Given the later comments it seems better to filter out encoding errors and 
> control characters. Programs that parse the output already cannot trust the 
> strings to be exactly right, since newlines are gonna get replaced no matter 
> what. So there seems little benefit to copying the other garbage faithfully.
> 
> Revised proposed patch(es) attached.

This is better, though this means that mount points now
need to match the locale of df or they won't be displayed.
Theoretically that was the case previously, but only for control chars
and so wouldn't have have had a practical impact for mounts
encoded in another local, only for security/robustness reasons where
one might have \n etc.

I've pushed the c_iscntrl patch since it's simplest
and probably most appropriate patch for an existing release.

If you consider the matching encoding issue as a non issue,
then I'm OK with this.

cheers,
Pádraig




This bug report was last modified 6 years and 160 days ago.

Previous Next


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