[Python-Dev] Shouldn't I be able to print Unicode objects?

M.-A. Lemburg mal@lemburg.com
Tue, 05 Jun 2001 22:16:02 +0200


Skip Montanaro wrote:
> 
>     Michael> Well, what would you have
> 
>     >>>> print u"\N{DEGREE SIGN}"
> 
>     Michael> (or equivalently
> 
>     Michael> str(u"\N{DEGREE SIGN}")
> 
>     Michael> since we're eventually going to have to stuff an 8-bit string
>     Michael> down stdout) do?
> 
> How about if print calls the .encode("latin1") method for me it gets an
> ASCII encoding error?  If "latin1" isn't a reasonable default choice, it
> could pick an encoding based on the current locale.

Please see Lib/site.py for details on how to enable all these
goodies -- it's all there, just disabled and meant for super-users
only ;-)

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/