-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Incorrect transcoding of text attachments #132
Comments
Hi, I faced this issue too. I'll work on this as soon the CI process run again (see #170). Can you provide a raw message body with such attachments? |
1.eml.tar.gz |
Thank you very much for the feedback, we'll look soon on it |
With #196 I can correctly see |
Problem with method $attachment->getDecodedContent() is still exist. Encoding in file is broken after saving it. |
Hi, the screenshot contains the current public release: the fix instead is present only in the develop branch, not yet released |
Version 1 has been released with the fix. |
https://github.com/ddeboer/imap/blob/master/src/Message/Part.php#L182
This code use
iconv()
ormb_convert_encoding()
for transcoding content of text file.$this->getCharset()
detects encoding by parameters returned byimap_fetch_structure()
. If there is no encoding parameter for attachment, then$this->getCharset()
returnsnull
, which is sent tomb_convert_encoding()
as input encoding. Butmb_convert_encoding()
not in all cases can detect encoding of file. And in this case i have attachment file with broken and unrecoverable encoding.May be there needed an optional parameter for method
Part::getDecodedContent()
. For example:The text was updated successfully, but these errors were encountered: