[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] 470733 - yet more unicode errors





On Tue, 11 Nov 2008, David Cantrell wrote:


toUTF8() doesn't strike me as the best way.  Can we not go with try/except and
catch UnicodeDecodeError rather than looking at the type of the str?  End
result is the same, I guess, but when I see code looking at types of variables
like this, it reminds me of various FailCode from Java at GT.



from yum.misc import to_unicode, to_utf8, to_unicode_maybe, to_str

in theory, those should help things a good bit.

-sv


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]