print \"Español\\nPortuguês\\nItaliano\".encode(\'utf-8\')
Errors:
Traceback (most recent call last): File \"\", line 1,
First of all, in Python 2.x you can't encode a str that has non-ASCII characters. You have to write
print u"Español\nPortuguês\nItaliano".encode('utf-8')
Using UTF-8 at the Windows console is difficult.
chcp 65001encodings._aliases to treat "cp65001" as an alias of UTF-8.And even then, it doesn't seem to work right.