UnicodeDecode error while printing line (#539258)
INADA Naoki
songofacandy at gmail.com
Tue Mar 16 16:09:24 GMT 2010
>> What is pfmt there?
>
> I've looked at your code.
>
> fmt = path + ":%s" + eol_marker
>
> path is unicode string there, right? So fmt is also unicode string and
> therefore you get that error. This is wrong: using unicode fmt to put there
> non-unicode string.
There is another problem.
The path may contain "%s" so fmt % (line,) is dangerous.
--
INADA Naoki <songofacandy at gmail.com>
More information about the bazaar
mailing list