On Wed, Nov 21, 2007 at 05:16:32AM -0500, Glenn Fowler wrote:
> #
> # Byte ranges for Shift-JIS encoding (hexadecimal):
> # First byte:   81-9F, E0-EF
> # Second byte:  40-7E, 80-FC
> #
> # Now test out some multi byte characters which
> # include 7bit aka ASCII bytes with 0x81 0x{40-7E}
> #
> 
> Command=${0##*/}
> integer Errors=0
> 
> function err_exit
> {
>       print -u2 -n "\t"
>       print -u2 -r ${Command}[$1]: "${@:2}"
>       ((Errors++))
> }
> alias err_exit='err_exit $LINENO'
> alias binprintf=/usr/bin/printf
> 
> typeset -i16 chr
> 
> for ((chr=0x40; chr<=0x7E; chr++))
> do    c=${chr#16#}
>       for s in \\x81\\x$c \\x$c
>       do      b="$(printf "$s")"
>               n="$(binprintf "$s")"
>               [[ $b == "$n" ]] || err_exit "printf difference for \"$s\" -- 
> builtin '$b' native '$n'"
>               u=$(print -- $b)
>               q=$(print -- "$b")
>               [[ $u == "$q" ]] || err_exit "quoted print difference for 
> \"$s\" -- $b => '$u' vs \"$b\" => '$q'"
>       done
> done
> exit $Errors
> ---
> 
> it only has one difference
>       tst-03[32]: quoted print difference for "\x81\x7c" -- ?| => '?\|' vs 
> "?|" => '?|'
> I'll check with dgk on that in the (later) morning

This one and also the escaped `[' in \0x81\x5c is covered by the
change for mac_copy() in src/cmd/ksh93/sh/macro.c  also
included in my patch.


        Werner
 
-- 
 Dr. Werner Fink <[EMAIL PROTECTED]>
 SuSE LINUX Products GmbH,  Maxfeldstrasse 5,  Nuernberg,  Germany
 GF: Markus Rex,  HRB 16746 (AG Nuernberg)
 phone: +49-911-740-53-0,  fax: +49-911-3206727,  www.opensuse.org
------------------------------------------------------------------
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to