Show More
@@ -332,6 +332,11 b' def headdecode(s):' | |||||
332 | continue |
|
332 | continue | |
333 | except UnicodeDecodeError: |
|
333 | except UnicodeDecodeError: | |
334 | pass |
|
334 | pass | |
|
335 | # On Python 3, decode_header() may return either bytes or unicode | |||
|
336 | # depending on whether the header has =?<charset>? or not | |||
|
337 | if isinstance(part, type(u'')): | |||
|
338 | uparts.append(part) | |||
|
339 | continue | |||
335 | try: |
|
340 | try: | |
336 | uparts.append(part.decode('UTF-8')) |
|
341 | uparts.append(part.decode('UTF-8')) | |
337 | continue |
|
342 | continue |
General Comments 0
You need to be logged in to leave comments.
Login now