Hi Daniel,
You wrote:
> According to the documentation, the section delimiter consists of at
> least two characters, and if you omit the second character when using
> -d/--section-delimiter, the second character is implied to be ':'.
> However, this doesn't seem to be the case in nl 9.3 if I provide a
> single non-ASCII char:
>
> $ printf "a\nä:\nb" | nl -dä
> 1 a
> 2 ä:
> 3 b
>
> If I add the ':' manually, I get the expected output:
>
> $ printf "a\nä:\nb" | nl -dä:
> 1 a
>
> b
I fixed this one recently with this commit:
commit 6bbf04db6335a97adf06ad31ab6cea9292ad7d2c
Author: Collin Funk <[email protected]>
AuthorDate: Sat Feb 7 11:15:23 2026 -0800
Commit: Collin Funk <[email protected]>
CommitDate: Sun Feb 8 18:45:24 2026 -0800
nl: support multi-byte section delimiters
* NEWS: Mention the improvement.
* src/nl.c: Include mcel.h.
(DEFAULT_SECTION_DELIMITERS): Resize to fit 2 multi-byte characters.
(section_del_len): New variable.
(check_section): Compare against section_del_len instead of 2.
(main): Support multi-byte characters for the -d option.
* tests/nl/multibyte.sh: New file.
* tests/nl/nl.sh: New file, moved from tests/misc/nl.sh.
* tests/local.mk (all_tests): Add the new test. Adjust the existing
tests file name.
* cfg.mk (exclude_file_name_regexp--sc_space_tab): Adjust Adjust the
existing tests file name.
Sorry I did not see this bug report beforehand. Thanks for the report,
closing it now.
Collin