arthur-debert / google-code-issues-migrator

A simple script to migrate issues from google code to github.
67 stars 56 forks source link

Handle attachements with non-ascii filenames properly. #34

Closed davidsansome closed 9 years ago

davidsansome commented 10 years ago

If an issue has an attachment with a non-ascii filename, the script currently fails with a UnicodeDecodeError in: body = u'From {author} on {date}\n\n{body}'.format(**comment)

This is because type(comment['body']) == str, and it contains utf-8-encoded bytes from get_attachment's .encode('utf-8').

Example (with this fix): https://code.google.com/p/clementine-player/issues/detail?id=151#c2 https://github.com/clementine-player/Clementine/issues/151#issuecomment-29982982

davidperrenoud commented 10 years ago

Oh, I lost so much time on this bug. This pull request should definitely be merged. Thanks for the fix!

joelpt commented 9 years ago

Merged, thanks!