Re: UnicodeDecodeError

Jim Ramsay <[email protected]>
Newsgroups gmane.mail.spam.tmda.user
Message-ID <20061117071140.5e0d5617@home>
Werner Fleck <[email protected]> wrote:
> I might have found a fix for the problem, but be aware that this is my
> first try at programming python :-)
> 
> The error seems to be caused by the string operation in the line
> 
>     return "(%s) %s" % (CharSet,
>       TranslateToUTF8(PVars[("General", "CSEncoding")], Str, Errors))
> 
> When I replace this with
> 
>     return TranslateToUTF8(PVars[("General", "CSEncoding")],
>       "(%s) %s" % (CharSet, unicode(Str, "latin1")),
>       Errors)
> 
> everything works fine for me.
> 
> I've attached a diff to this message.

Great, and thanks for this!  Adam, could you please try this patch and
let me know if it fixes things for you?  If so, I'll check it in to CVS
right away.

-- 
Jim Ramsay
"Me fail English?  That's unpossible!"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.