Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email's attachment won't be exported correctly. #42

Closed
XiaoMouR opened this issue Nov 22, 2017 · 2 comments
Closed

Email's attachment won't be exported correctly. #42

XiaoMouR opened this issue Nov 22, 2017 · 2 comments
Labels

Comments

@XiaoMouR
Copy link
Contributor

XiaoMouR commented Nov 22, 2017

I try to export an email's attachment(Zip archive), but that exported file could not be unzip successfully.I compare this file to which exported by emali client, like follows:
50 4B 03 04 14 00 08 00 08 00 EF BF BD 02 29 4A -->export by enmime
50 4B 03 04 14 00 08 00 08 00 C2 02 29 4A 00 00 -->export by email client
It's clearly that the byte 'C2' transfers to 'EF BF BD 02', I also check the implementation of Part's Read method:
return p.utf8Reader.Read(b)
OK, maybe it causes the issue when I need to read a binary file. So can export a METHOD for read the decoded binary content?

@jhillyerd
Copy link
Owner

I was able to write a test to reproduce this in 3dae741 - the only catch is that the attachment had to have a charset encoding header - which a ZIP file should not. Can you check the email that triggered the bug and confirm?

@XiaoMouR
Copy link
Contributor Author

XiaoMouR commented Nov 27, 2017

Yes. The reason you point out triggered the bug.
BTW, I have tried to construct the email example triggered the bug in my repo, but too busy to make me forget to PR it😫.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants