[Pythonmac-SIG] How to print unicode to OS-X Terminal.app

Christopher Barker Chris.Barker at noaa.gov
Thu Feb 14 00:21:18 CET 2008

Hi all,

I generally use Terminal.app as my terminal with python.

With all the default settings, it appears to be a showing up as an ascii 
terminal to python. This means that if I do:

print UnicodeObject

it tried to encode it as ascii, which often fails.

However, it seems that OS-X is pretty unicode savy, so you'd think I 
should be able to do this. Indeed, if I go to setting, I see that under 
display, it's set to UTF-8. So how to I get Python to convert to utf-8 
with a print statement, instead of ascii?


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Pythonmac-SIG mailing list