Ron Garret <rnospa...@flownet.com> writes: > Python 2.6.2 on OS X 10.5.7: > > [...@mickey:~]$ echo $LANG > en_US.UTF-8 > [...@mickey:~]$ cat frob.py > #!/usr/bin/env python > print u'\u03BB' > > [...@mickey:~]$ ./frob.py > ª > [...@mickey:~]$ ./frob.py > foo > Traceback (most recent call last): > File "./frob.py", line 2, in <module> > print u'\u03BB' > UnicodeEncodeError: 'ascii' codec can't encode character u'\u03bb' in > position 0: ordinal not in range(128)
I get the same behaviour on Debian GNU/Linux, python 2.5.2. It's certainly not desirable; the terminal, the shell, and the filesystem are all using UTF-8 so it should work fine. You might be best advised to report this as a bug to the Python bug tracker <URL:http://bugs.python.org/>. -- \ “I fly Air Bizarre. You buy a combination one-way round-trip | `\ ticket. Leave any Monday, and they bring you back the previous | _o__) Friday. That way you still have the weekend.” —Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list