Hi!
----
Oracle's Solaris PIT hit an issue in ast-ksh.2012-10-24 (it may be
much older) with typeset -L variables and multibyte characters which
are wider than one terminal cell (the example is for SuSE 12.2/Linux
on AMD64 in the en_US.UTF-8 locale).
-- snip --
$ LC_ALL=en_US.UTF-8 ~/bin/ksh -c 'typeset -L2 l ; l="x$(printf
"\u[5154]")x" ; print "$l"'
x?
-- snip --
The problem is that '?' marks a single byte which appears to be an
invalid multibyte character sequence in this context.
Looking at a hex dump confirms his:
-- snip --
$ LC_ALL=en_US.UTF-8 ~/bin/ksh -c 'typeset -L2 l ; l="x$(printf
"\u[5154]")x" ; print "$l"' | od -t x1
0000000 78 e5 0a
0000003
-- snip --
Testcase using AST "wc":
-- snip --
$ LC_ALL=en_US.UTF-8 ~/bin/ksh -c 'typeset -L2 l ; l="x$(printf
"\u[5154]")x" ; print "${l}X"' | ~/bin/ksh -c 'builtin wc ; wc -C'
wc: warning: invalid multibyte character
2
-- snip --
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers