Message162150
| Author |
ned.deily |
| Recipients |
hynek, javahaxxor, ned.deily, r.david.murray, ronaldoussoren |
| Date |
2012年06月02日.17:05:44 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1338656747.3.0.923744279028.issue14986@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
mac_roman is an obsolete encoding from Mac OS 9 days; it is seldom seen on modern OS X systems. But it is often the fallback encoding set in ~/.CFUserTextEncoding if the LANG or a LC_* environment variable is not set (see, for example, http://superuser.com/questions/82123/mac-whats-cfusertextencoding-for). If you run a terminal session using Terminal.app, the LANG environment variable is usually set for you to an appropriate modern value, like 'en_US.UTF-8' in the US locale; this is controlled by a Terminal.app preference; other terminal apps like iTerm2 have something similar. But if you are using xterm with X11, xterm does not inject a LANG env variable. So, something like:
python3.2 -c 'print("\u030a")'
may fail running under xterm with UnicodeEncodeError but will print the expected character when run under Terminal.app. I avoid those kinds of issues by explicitly setting LANG in my shell profile.
Let us know if that helps or, if not, how to reproduce your issue. |
|