• ksh93u+m locale issue with select statement

    From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.unix.shell on Sun Jan 11 05:51:26 2026
    From Newsgroup: comp.unix.shell

    Kornshell doesn't seem to handle umlauts or other non-ASCII Unicode
    characters correctly with the 'select' statement; the display shows
    (for example)

    1) abcdefghijklmnopqrstuvwxyz 15) abcdefghijklmnopqrstuvwxyz
    2) abcdefghijklmnopqrstuvwxyz 16) abcdefghijklmnopqrstuvwxyz
    3) |nbcdefghijklmnopqrstuvwxyz 17) ABCDEFGHIJKLMNOPQRSTUVWXYZ
    4) |nbcdefghijklmn||pqrstuvwxyz 18) ABCDEFGHIJKLMNOPQRSTUVWXYZ
    5) |nbcdefghijklmn||pqrst|+vwxyz 19) |aBCDEFGHIJKLMNOPQRSTUVWXYZ
    6) abcdre4fghijkl-|nopqrstuvwxyz 20) |aBCDEFGHIJKLMN|uPQRSTUVWXYZ
    7) abcdre4fghijklmnopqrstuvwxyz 21) |aBCDEFGHIJKLMN|uPQRST|LVWXYZ
    8) |nbcdefghijklmn||pqr|ft|+vwxyz 22) ABCDEFGHIJKLMNOPQRSTUVWXYZ
    9) abcdefghijklmnopqrstuvwxyz 23) ABCDEFGHIJKLMNOPQRSTUVWXYZ
    10) abcdefghijklmnopqrstuvwxyz 24) |aBCDEFGHIJKLMN|uPQR?T|LVWXYZ
    11) abcdefghijklmnopqrstuvwxyz 25) ABCDEFGHIJKLMNOPQRSTUVWXYZ
    12) abcdefghijklmnopqrstuvwxyz 26) ABCDEFGHIJKLMNOPQRSTUVWXYZ
    13) abcdefghijklmnopqrstuvwxyz 27) ABCDEFGHIJKLMNOPQRSTUVWXYZ
    14) abcdefghijklmnopqrstuvwxyz

    Somehow it obviously gets confused with the count of the number of
    characters and the count of the octets in the encoding, thus the
    formatting gets corrupted.

    (Playing with other locales doesn't change that effect.)

    Observed in ksh version AJM 93u+m/1.0.8 2024-01-01.

    (Bash handles that correctly.)

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Martijn Dekker@martijn@inlv.demon.nl to comp.unix.shell on Wed Feb 25 00:39:12 2026
    From Newsgroup: comp.unix.shell

    Op 11-01-2026 om 04:51 schreef Janis Papanagnou:
    Kornshell-adoesn't-aseem-ato-ahandle-aumlauts-aor-aother-anon-ASCII-aUnicode characters-acorrectly-awith-athe-a'select'-astatement;

    The code for showing the menu is not aware of multibyte locales. Thanks for the report. I've fixed it for the next release. See: https://github.com/ksh93/ksh/commit/18e4cbc1

    Observed in ksh version AJM 93u+m/1.0.8 2024-01-01.

    FYI, you're two point releases behind.
    --
    || modernish -- harness the shell
    || https://github.com/modernish/modernish
    ||
    || KornShell lives!
    || https://github.com/ksh93/ksh
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.unix.shell on Wed Feb 25 03:06:35 2026
    From Newsgroup: comp.unix.shell

    Thanks for fixing the select issue!

    On 2026-02-25 01:39, Martijn Dekker wrote:
    Op 11-01-2026 om 04:51 schreef Janis Papanagnou:
    [...]
    Observed in ksh version AJM 93u+m/1.0.8 2024-01-01.

    FYI, you're two point releases behind.

    Thanks. - That's probably because since my distro meanwhile supports
    "u+m" already I'm just using what's provided.[*]

    But maybe I should again get the newest one and ignore what comes out
    of the box with my system? (I think if any of the two other issues I
    have with "u+m" would get fixed then I'd do that, but I recall you
    haven't intended to change these[**], so there's [at the moment] no
    pressing need to change to the latest release.)

    Janis

    [*] If it were still an "u+" I'd certainly get "u+m" from a more up to
    date source since I prefer that. I'm glad that "u+m" made it into the
    distros.

    [**] One was the vi-mode expansion of $(cmd) when typing a '*', which
    was already _existing_ in original "u+" (and which, sadly, you removed
    from "u+m"); I had used that very often and I'm really missing it. :-/

    --- Synchronet 3.21b-Linux NewsLink 1.2