ordinal not in range

Jaap van Wingerde mailinglists at vanwingerde.net
Mon Mar 2 04:37:56 EST 2009


Stefan Behnel wrote:
>> Jaap van Wingerde wrote:
>> outfile = codecs.open(output, "w", "utf_8")
> I guess you mixed up the case here.
> Does this help?
> outfile = codecs.open(output, "wb", encoding="UTF-8")

According to the Python "Codec registry an base classes"
<http://www.python.org/doc/2.6/library/codecs.html> "U8", "UTF", and
"utf8" are aliases and is the codec: utf_8.

Jaap.



-- 
Jaap van Wingerde
e-mail: 1234567890 at vanwingerde.net
web: http://jaap.vanwingerde.net/




More information about the Python-list mailing list