Re: subprocess stdin encoding

2007-02-05 Thread Thinker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 yc wrote: I have a encoding problem during using of subprocess. The input is a string with UTF-8 encoding. the code is: tokenize = subprocess.Popen(tok_command,stdin=subprocess.PIPE,stdout=subprocess.PIPE,close_fds=True,shell=True)

Re: subprocess stdin encoding

2007-02-05 Thread Jean-Paul Calderone
On Mon, 05 Feb 2007 20:54:48 +0800, Thinker [EMAIL PROTECTED] wrote: [snip] in site.py . and change if 0: to if 1: to enable string encoding. Now, you can execute python interpreter with LC_CTYPE='UTF-8'. While this is sort of a correct answer to the question asked, it isn't really a correct

Re: subprocess stdin encoding

2007-02-05 Thread Jean-Paul Calderone
On 4 Feb 2007 23:10:29 -0800, yc [EMAIL PROTECTED] wrote: I have a encoding problem during using of subprocess. The input is a string with UTF-8 encoding. the code is: tokenize = subprocess.Popen(tok_command,stdin=subprocess.PIPE,stdout=subprocess.PIPE,close_fds=True,shell=True)

subprocess stdin encoding

2007-02-04 Thread yc
I have a encoding problem during using of subprocess. The input is a string with UTF-8 encoding. the code is: tokenize = subprocess.Popen(tok_command,stdin=subprocess.PIPE,stdout=subprocess.PIPE,close_fds=True,shell=True) (tokenized_text,errs) = tokenize.communicate(t) the error is: File