]> git.ipfire.org Git - thirdparty/coreutils.git/commit
df: avoid multibyte character corruption on macOS
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Jul 2018 16:50:20 +0000 (09:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 27 Jul 2018 01:19:45 +0000 (18:19 -0700)
commit1ecf7abe4a688b3a1f8a0a81f49af8134a1273ba
tree0e2a3f523ef6b31f17ff7948bebea57f9e19cb44
parent437555061ca94fb009cdf0e96b3368f00de95f1e
df: avoid multibyte character corruption on macOS

This improves on the earlier fix for the problem reported by
Chih-Hsuan Yen (Bug#32236), by also looking for other control
characters and for encoding errors.
* src/df.c: Include wchar.h and wctype.h instead of c-ctype.h.
(hide_problematic_chars): Process the string as multibyte.
Use iswcntrl, not c_iscntrl.
src/df.c