On Mon, Jul 14, 2014 at 10:21:32AM +0800, Jeremy Kerr wrote:
>          if not isinstance(payload, unicode):
> -            payload = unicode(payload, charset)
> +            charset = part.get_content_charset()
> +
> +            # Check that we have a charset that we understand. Otherwise,
> +            # ignore it and fallback to our standard set.
> +            if charset is not None:
> +                try:
> +                    codec = codecs.lookup(charset)
> +                except LookupError:
> +                    charset = None

Thanks, that looks like a better idea to me too.

Thanks,
Siddhesh

Attachment: pgpmYTJ0RDaLC.pgp
Description: PGP signature

_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to