I thought it was hard-coded into the Python executable at compile time, 
but that is apparently not the case:

[...@mickey:~]$ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys;print sys.stdin.encoding
UTF-8
>>> ^D
[...@mickey:~]$ echo 'import sys;print sys.stdin.encoding' | python
None
[...@mickey:~]$

And indeed, trying to pipe unicode into Python doesn't work, even though 
it works fine when Python runs interactively.  So how can I make this 
work?

Thanks,
rg
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to