]> git.ipfire.org Git - thirdparty/coreutils.git/commit
paste: support multi-byte delimiters
authorPádraig Brady <P@draigBrady.com>
Mon, 12 Jan 2026 23:41:29 +0000 (23:41 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 13 Jan 2026 14:32:01 +0000 (14:32 +0000)
commit06d228043f4bbf056d1d33f7fd2b4a39259ab5ae
treec414f90f0cace0b64d5160778c96c89cf5cab668
parente326d0df65fc01116215ff778e907b3a8dd0df91
paste: support multi-byte delimiters

* src/paste.c (collapse_escapes): This is the central --delimiters
parsing function, so adjust to handle multi-byte chars with
mcel_scanz().  Populate a delimiters length array to support
characters of differing lengths.
(paste_serial): Use the delimiters length array to output
the appropriate delimiter.
(paste_parallel): Likewise.
* tests/paste/multi-byte.sh: A new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the improvement.
NEWS
src/paste.c
tests/local.mk
tests/paste/multi-byte.sh [new file with mode: 0755]
tests/paste/paste.pl [moved from tests/misc/paste.pl with 100% similarity]