On Fri, May 28, 2010 at 02:00:36PM +0200, Werner Fink wrote:
> /suse/werner> ksh -c 'echo ${.sh.version}'
> Version JM 93t+ 2010-05-24
> /suse/werner> ksh ksh93/src/cmd/ksh93/tests/sjis.sh
>         sjis.sh[61]: Shift-JIS encoding failed
> 
> it seems that the `test' builtin fails on the characters
> 
>   \x81\x5c
>   \x81\x7c
> 
> the scriptlet for testing this can be found in the
> attachment.

Are there any news?
Just an example session on the command line:

  tcsh> setenv LANG ja_JP.SJIS
  tcsh> ksh
  ksh> set -x
  ksh> test -n $(/usr/bin/printf '\x81\x7c')                     
  + /usr/bin/printf '\x81\x7c'
  + test -n '�\|'
  ksh> mbchar="$(printf "\x81\x7c")"
  + printf '\x81\x7c'
  + mbchar=�|
  ksh> test $(/usr/bin/printf '\x81\x7c') = ${mbchar}   
  + /usr/bin/printf '\x81\x7c'
  + test '�\|' = �|

as seen, the byte \x7c (aka `|') of the multi byte character
is escaped.  Btw: doing

  ksh> $(/usr/bin/printf '\x81\x5c')
  Segmentation fault

seems to cause a segmentation fault.


     Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to