Re: bug#32236: df header corrupted with LANG=zh_TW.UTF-8 on macOS

2018-07-26 Thread Paul Eggert
Pádraig Brady wrote: I've pushed the c_iscntrl patch since it's simplest and probably most appropriate patch for an existing release. Yes, that makes sense for a quick patch. However, for the next release I think it'd be better to catch encoding errors and multibyte control characters, given

Re: [PATCH] bootstrap, gnulib-tool: fix translations rsync

2018-07-26 Thread Paul Eggert
Colin Watson wrote: Has anyone had a chance to look into this? I looked at it just now; seems OK, and I installed it. Thanks.

Re: [PATCH] bootstrap, gnulib-tool: fix translations rsync

2018-07-26 Thread Colin Watson
On Wed, Jul 18, 2018 at 02:26:03PM +0100, Colin Watson wrote: > Previously, we created files such as $pobase/Makefile.in.in and then the > subsequent rsync would immediately delete them. > > * build-aux/bootstrap (po_download_command_format): Avoid deleting > non-.po files in target directory when

Re: bug#32236: df header corrupted with LANG=zh_TW.UTF-8 on macOS

2018-07-26 Thread Pádraig Brady
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 > s

Re: bug#32236: df header corrupted with LANG=zh_TW.UTF-8 on macOS

2018-07-26 Thread Bruno Haible
Paul Eggert wrote: > Revised proposed patch(es) attached. Looks good to me, except for one little thing: > memcpy (dst, src, n); src and dst may overlap. Therefore memmove should be used instead of memcpy. Bruno

Re: bug#32236: df header corrupted with LANG=zh_TW.UTF-8 on macOS

2018-07-26 Thread Paul Eggert
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 gonn