Comment 6 for bug 839609

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This bug is actually caused by invalid handling of input (sys.argv), not output. When binary string (in utf-8) is coerced with unicode strings (that are part of translated system messages) UnicodeDecode error is raised as, by default, python coerces unicode and binary strings by converting the binary string to unicode assuming ansi encoding.

A possible fix is to properly decode sys.argv arguments. I've tried this by hard-coding UTF-8 input but it would be nice to fix this in general too.