some of your characters did not translate properly for email
here is a script that just checks utf-8 s-tzet

---
s=$'\303\237'
a=( name=$s )
b=$s
for lang in C de_DE.UTF-8
do      export LANG=$lang
        printf $'%16s %s : ' $LANG a
        print $a
        printf $'%16s %s : ' $LANG b
        print $b
done
---

and here is the output with the s-tzet char replaced with SS

---
               C a : ( name=$'\303\237' )
               C b : SS
     de_DE.UTF-8 a : ( name=SS )
     de_DE.UTF-8 b : SS
---

this looks correct in my linux/xterm window

is the weirdness that newlines show up for "$a" vs not for $a?

-- Glenn Fowler -- AT&T Research, Florham Park NJ --

On Mon, 22 Oct 2007 11:51:34 +0200 Bernd Eggink wrote:
> I'm using ksh on Crux 2.3, my language setting is LANG=de_DE.UTF-8. I 
> noticed a weird difference when printing a structured variable:

> $ a=( name='äöüÄÖÜßáà' )
> $ print $a
> ( name=äöüÄÖÜßáà )
> $ print "$a"
> (
>       name==äöüÄÖÜßáÃ
> )

> Here is the output piped through "od -xc":

> $ print $a | od -xc
> 0000000 2028 616e 656d c33d c3a4 c3b6 c3bc c384
>            (       n   a   m   e   = 303 244 303 266 303 274 303 204 303
> 0000020 c396 c39c c39f c3a1 20a0 0a29
>          226 303 234 303 237 303 241 303 240       )  \n
> 0000034
> $ print "$a" | od -xc
> 0000000 0a28 6e09 6d61 3d65 c33d c3a4 c3b6 c3bc
>            (  \n  \t   n   a   m   e   =   = 303 244 303 266 303 274 303
> 0000020 c384 c396 c39c c39f c3a1 290a 000a
>          204 303 226 303 234 303 237 303 241 303  \n   )  \n  \0
> 0000035

> The error does not occur with unstructured variables:

> $ a="äöüÄÖÜßáà"
> $ print $a
> äöüÄÖÜßáà
> $ print "$a"

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to