Chris> So how to I get Python to convert to utf-8 with a print
    Chris> statement, instead of ascii?

The print statement can't do it directly, but you can encode Unicode objects
using different charsets then print the result.  Try this:

    >>> unicode("\xef", "latin-1")
    u'\xef'
    >>> unicode("\xef", "latin-1").encode("utf-8")
    '\xc3\xaf'
    >>> print unicode("\xef", "latin-1").encode("utf-8")
    ï

-- 
Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to