Comment 2 for bug 1442298

Revision history for this message
Mark Sapiro (msapiro) wrote :

I see the bug, but the patch doesn't fix the problem in all cases. I think a better patch is instead of

        regexp = regexp.decode()

to do

        regexp = regexp.decode(Utils.GetCharSet(mlist.preferred_language)).

I still need to do more testing, but I would like to know if providing this character set in this way still fixes the bug in your environment.

The problem with the original patch is decode() without a charset uses Python's default string encoding which is often ASCII resulting in UnicodeDecodeError and no change to regexp. While this doesn't make things worse, it doesn't fix the problem unless the site has changed Python's default string encoding to a charset more appropriate to the installation.