On Fri, Jul 04, 2014 at 08:47:01AM +0800, Jeremy Kerr wrote:
> Hi Siddesh,
> 
> >>We recently encountered a case in our glibc patchwork instance on
> >>sourceware, where a patch was dropped because it had x-unknown
> >>charset.  I used the following patch to fix this in our instance.  The
> >>fix I used was to fall back on a set of encodings (instead of just
> >>utf-8) when the charset is not mentioned or if it is set as x-unknown.
> >>
> >>I hope this is useful.  I'd love to know if you all think there is a
> >>better way to fix this so that I can implement that in our instance
> >>instead of my hack.
> 
> Just one thing I noticed when applying this:
> 
> >+
> >+            # If there is no charset or if it is unknown, then try some 
> >common
> >+            # charsets before we fail.
> >+            if charset is None or charset == 'x-unknown':
> >+                try_charsets = ['utf-8', 'windows-1252', 'ascii', 
> >'iso-8859-1']
> 
> Is there any point including ascii there? If it didn't parse as utf-8, I
> don't think it'll parse as ascii either.

Right, it won't.  I'll remove it.

> Also, could you send me a Signed-off-by line for this patch too?

Sure, I'll send an updated patch shortly.

Siddhesh

Attachment: pgpIuTEefDbLk.pgp
Description: PGP signature

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

Reply via email to