]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/bin/parsemail.py
[tests] Add tests for utf-8 patches
[patchwork] / apps / patchwork / bin / parsemail.py
index e2beeae1b752d8ce03d64ee77d839caf294cd09d..2acceb5836a871835a42eff65f99360e078b6823 100755 (executable)
@@ -137,16 +137,7 @@ def find_content(project, mail):
         if part.get_content_maintype() != 'text':
             continue
 
-        #print "\t%s, %s" % \
-        #    (part.get_content_subtype(), part.get_content_charset())
-
-        charset = part.get_content_charset()
-        if not charset:
-            charset = mail.get_charset()
-        if not charset:
-            charset = 'utf-8'
-
-        payload = unicode(part.get_payload(decode=True), charset, "replace")
+        payload = part.get_payload(decode=True)
 
         if part.get_content_subtype() == 'x-patch':
             patchbuf = payload