[PATCH] pwclient: fix handling of UTF-8 char in submitter name
jk at ozlabs.org
Tue Dec 14 00:55:18 EST 2010
> Why not just handle and store the patch as an array of bytes (Python
> 'str' type) instead of a unicode string?
Basically, because we need to process the patch itself; either extracting it
from the email message, or for finding the hash. Both of these require looking
into the content of the patch, which means we need to be able to decode it.
> The restriction that every patch should be valid unicode makes it
> impossible to patch existing source files that already have non-utf8
> data inside them (I suppose this includes source trees where files are
> encoded as iso-8859-1, as the unicode diff won't be encoded back to the
> original encoding when exporting the patches from Patchwork, will it?).
> This would require changing the database model and xmlrpc API to use
> binary data (I hope Django support it)
no, django doesn't support it out of the box, I believe this is a django
> instead of a unicode string, but
> it sounds better than piling up unicode encoding/decoding hacks.
More information about the Patchwork