Re: why expect make the Chinese code garbled



Jason wrote:
thanks! the reason is the environment variable, if I use
LC_ALL=zh_CN.GB18030 ./myscripts
it works.

This change in environment probably changes what Tcl sets
[encoding system] to be.

I don't know how to set it in expect scripts, I use
set env(LC_ALL) zh_CN.GB18030
it didn't work.

By the time you get to where script evaluation permits setting elements
of the ::env array, a value for [encoding system] has already been
chosen.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.


Quantcast