]> git.ipfire.org Git - thirdparty/util-linux.git/commit
col: make input to tolerate invalid wide characters
authorSami Kerola <kerolasa@iki.fi>
Thu, 26 Nov 2020 22:01:39 +0000 (22:01 +0000)
committerSami Kerola <kerolasa@iki.fi>
Wed, 2 Dec 2020 22:12:32 +0000 (22:12 +0000)
commit14a36f96ee671c2d3a20fa15437844a711e0b29c
tree6a93575bba1da51d5ec7aa9ca078fd99eadf065a
parent77d44c1e51d4a0eec29af292864067d36231534e
col: make input to tolerate invalid wide characters

The getwchar(3) will choke and exit if invalid character is encountered.
This change will make col(1) to print broken multibyte characters as
\x{hex} string.

Reported-by: Vitaly Lipatov <lav@etersoft.ru>
Addresses: https://github.com/karelzak/util-linux/issues/1198
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests/expected/col/multibyte [deleted file]
tests/expected/col/multibyte-invalid [new file with mode: 0644]
tests/expected/col/multibyte-valid [new file with mode: 0644]
tests/ts/col/multibyte
text-utils/col.c