os.system: string encoding
Lawrence D'Oliveiro
ldo at geek-central.gen.new_zealand
Tue Jun 29 03:31:19 EDT 2010
In message <alpine.DEB.1.10.1006251708470.3765 at localhost>, Peter Kleiweg
wrote:
> How do I set the string encoding for os.system to anything other then
> UTF-8?
Works for me (on Debian Unstable):
ldo at theon:~> echo $LC_ALL
en_NZ.utf8
ldo at theon:~> python3.1
Python 3.1.2 (r312:79147, May 8 2010, 13:27:06)
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system('echo \N{EURO SIGN}')
€
0
>>> '\N{EURO SIGN}'
'€'
>>>
More information about the Python-list
mailing list