mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-07-29 03:50:45 +02:00
df: avoid multibyte character corruption on macOS
* src/df.c (hide_problematic_chars): Use c_iscntrl() as passing 8 bit characters to iscntrl() is not supported on macOS. * NEWS: Mention the bug fix. Fixes https://bugs.gnu.org/32236
This commit is contained in:
committed by
Pádraig Brady
parent
46d6bd0c0a
commit
437555061c
@@ -2,6 +2,10 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
* Noteworthy changes in release ?.? (????-??-??) [?]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
df no longer corrupts displayed multibyte characters on macOS.
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.30 (2018-07-01) [stable]
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <getopt.h>
|
||||
#include <assert.h>
|
||||
#include <c-ctype.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "canonicalize.h"
|
||||
@@ -281,7 +282,7 @@ hide_problematic_chars (char *cell)
|
||||
char *p = cell;
|
||||
while (*p)
|
||||
{
|
||||
if (iscntrl (to_uchar (*p)))
|
||||
if (c_iscntrl (to_uchar (*p)))
|
||||
*p = '?';
|
||||
p++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user