Subject: nl: -d doesn't use ':' as second char if a single non-ASCII char is provided

From: Daniel Hofstetter <[email-masked]>
Date: Sun, 20 Aug 2023 14:36:07 +0200

Hi,

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

Regards,
Daniel