os.system: string encoding

Peter Kleiweg p.c.j.kleiweg at rug.nl
Fri Jun 25 11:13:19 EDT 2010


How do I set the string encoding for os.system to anything other then UTF-8?


(peter) ~ echo $LANG
nl_NL at euro
(peter) ~ python3
Python 3.1.1 (r311:74480, Oct  2 2009, 11:50:52) 
>>> '\N{EURO SIGN}'
'€'
>>> import os
>>> os.system('echo \N{EURO SIGN}')
â?¬
0
>>> 


-- 
Peter Kleiweg



More information about the Python-list mailing list