{"action":"created","issue":{"url":"https://api.github.com/repos/ddeboer/imap/issues/228","repository_url":"https://api.github.com/repos/ddeboer/imap","labels_url":"https://api.github.com/repos/ddeboer/imap/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/ddeboer/imap/issues/228/comments","events_url":"https://api.github.com/repos/ddeboer/imap/issues/228/events","html_url":"https://github.com/ddeboer/imap/issues/228","id":263148630,"number":228,"title":"Issue with saving XML attachments","user":{"login":"it-can","id":644288,"avatar_url":"https://avatars3.githubusercontent.com/u/644288?v=4","gravatar_id":"","url":"https://api.github.com/users/it-can","html_url":"https://github.com/it-can","followers_url":"https://api.github.com/users/it-can/followers","following_url":"https://api.github.com/users/it-can/following{/other_user}","gists_url":"https://api.github.com/users/it-can/gists{/gist_id}","starred_url":"https://api.github.com/users/it-can/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/it-can/subscriptions","organizations_url":"https://api.github.com/users/it-can/orgs","repos_url":"https://api.github.com/users/it-can/repos","events_url":"https://api.github.com/users/it-can/events{/privacy}","received_events_url":"https://api.github.com/users/it-can/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-10-05T14:34:14Z","updated_at":"2017-10-05T15:24:12Z","closed_at":null,"author_association":"NONE","body":"Version: 1.0.1\r\n\r\nI had an error after issue #226, seems to be related to encoding with \"us-ascii\"\r\n\r\n@Slamdunk These are my email headers btw\r\n\r\n```\r\n------=_NextPart_000_01B0_01D33D5D.1AB50480\r\nContent-Type: text/html; charset=\"utf-8\"\r\nContent-Transfer-Encoding: 7bit\r\nContent-Description: body\r\n\r\n------=_NextPart_000_01B0_01D33D5D.1AB50480\r\nContent-Type: text/xml; name=\"test.xml\"\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename=\"test.xml\"\r\n\r\n------=_NextPart_000_01B0_01D33D5D.1AB50480\r\nContent-Type: application/octet-stream; name=\"test.pdf\"\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename=\"test.pdf\"\r\n```\r\n\r\nWhen saving the attachment, it seems the encoding is screwed of the XML file... The PDF seems correct...\r\n\r\n```\r\nï»¿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n```"},"comment":{"url":"https://api.github.com/repos/ddeboer/imap/issues/comments/334500002","html_url":"https://github.com/ddeboer/imap/issues/228#issuecomment-334500002","issue_url":"https://api.github.com/repos/ddeboer/imap/issues/228","id":334500002,"user":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars0.githubusercontent.com/u/152236?v=4","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T15:24:12Z","updated_at":"2017-10-05T15:24:12Z","author_association":"COLLABORATOR","body":"I was wrong: encoded attachment are charset-decoded if they are a text type like an XML.\r\n\r\nThe issue is that we consider the default server charset as us-ascii. Previous version did some guessing and in your case found the right charset: this is not an acceptable behaviour anymore because it's very brittle.\r\n\r\nI need to do further investigation (in the next days)."}}
{"actor":{"display_login":"Slamdunk"}}