]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/parser.py
Decode patch from UTF-8 while parsing from stdin
[patchwork] / apps / patchwork / parser.py
index 2b5e9a093c478756d65ef001cdb59e48eb0af0c5..24631b739822fde096f3f748343410be8ec2be3d 100644 (file)
@@ -63,8 +63,7 @@ def parse_patch(text):
     lc = (0, 0)
     hunk = 0
 
-
-    for line in text.split('\n'):
+    for line in text.decode('utf-8').split('\n'):
         line += '\n'
 
         if state == 0: