You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getBodyHtml always returns UTF8, parsing this HTML will lead to errors because the HTML meta tags indicate a different encoding and this is followed by DOMDocument, e.g.. This leads to broken umlauts.
Current behavior
When I load the html body of a message, it is always encoded/transcoded to UTF8 although the message part is in a different encoding. This is an issue because HTML also has information about the encoding and this does not get changed by ddeboer/imap. When this string is then processed by DOMDocument it leads to trouble with umlauts because DOMDocument observes the meta tags in the html which still show the original encoding, saving it then leads to double-encoding (because the UTF8 chars are saved as ANSI chars, for example).
What I would need is the html body in the original encoding so that it matches with the meta tags.
How to reproduce: code & error stack trace
Load non-UTF8 message from the server and check the bytes, umlauts will be encoded as UTF8 automatically although the server said the message part was not UTF8 encoded.
Expected behavior
getBodyHtml should return the HTML body in the original encoding or have a parameter to disable to forced UTF8 encoding.
The text was updated successfully, but these errors were encountered:
Summary
getBodyHtml always returns UTF8, parsing this HTML will lead to errors because the HTML meta tags indicate a different encoding and this is followed by DOMDocument, e.g.. This leads to broken umlauts.
Current behavior
When I load the html body of a message, it is always encoded/transcoded to UTF8 although the message part is in a different encoding. This is an issue because HTML also has information about the encoding and this does not get changed by ddeboer/imap. When this string is then processed by DOMDocument it leads to trouble with umlauts because DOMDocument observes the meta tags in the html which still show the original encoding, saving it then leads to double-encoding (because the UTF8 chars are saved as ANSI chars, for example).
What I would need is the html body in the original encoding so that it matches with the meta tags.
How to reproduce: code & error stack trace
Load non-UTF8 message from the server and check the bytes, umlauts will be encoded as UTF8 automatically although the server said the message part was not UTF8 encoded.
Expected behavior
getBodyHtml should return the HTML body in the original encoding or have a parameter to disable to forced UTF8 encoding.
The text was updated successfully, but these errors were encountered: