[BUG] 'case' broken for multi-byte characters

Martijn Dekker <[email protected]>
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
As of this commit:

> commit c5bf9702ea110bede687b57c0b5fa3fd0e15829e (HEAD, refs/bisect/bad)
> Author: Herbert Xu <[email protected]>
> Date:   Sun Jun 2 09:28:59 2024 +0800
> 
>     expand: Add multi-byte support to pmatch
> 
>     Add CTLMBCHAR support to pmatch.
> 
>     POSIX equivalence classes and collating symbols are not unsupported.
> 
>     Enable CTLMBCHAR generation in mbtodest.
> 
>     Signed-off-by: Herbert Xu <[email protected]>

...'case' is broken for multi-byte characters. The following test script, when 
saved in UTF-8, outputs 'BUG' instead of 'ok':

case "ρ" in
( "ρ" )	echo ok ;;
( * )	echo BUG; exit 1 ;;
esac

-- 
||	modernish -- harness the shell
||	https://github.com/modernish/modernish
||
||	KornShell lives!
||	https://github.com/ksh93/ksh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.