From: Ralph Corderoy Date: Sun, 6 Aug 2017 17:15:41 +0000 (+0100) Subject: cpstripped(): Rewrite multi-byte version. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/a091c28b416f83aa46dcb0bd0da81ca1d3b8a7f9?ds=inline;hp=a091c28b416f83aa46dcb0bd0da81ca1d3b8a7f9 cpstripped(): Rewrite multi-byte version. Removes the assert(3) failure reported on the list for 1.7-RC1 when a non-space, non-cntrl, rune has a wcwidth(3) of -1; output L'?' in its place. The old code also didn't reset mbtowc(3)'s state before trying to parse "?"; that's handled differently now so isn't an issue. Pad with the multi-byte encoding of L" ", having ensured the wcwidth(1) of L' ' is one, rather than with a non-wchar_t ' '. Point out padding only occurs in one particular case, and not the other two; quite odd. ---