GNOME Bugzilla – Bug 624234
Mailer doesn't honour charset in <META HTTP-EQUIV> when rendering mails.
Last modified: 2021-05-19 12:12:41 UTC
Created attachment 165786 [details] test mail gtkhtml has support for noticing such a header and re-rendering with the appropriate charset. However, in Evolution we disable that and attempt to convert to UTF-8 in advance. Which means that test mails like this don't get rendered properly...
Confirming. I see the issue too, with the attached message. The only thing I'm not sure about is what I should see in the first part, where the "currency" in iso-8859-1 is set. It's something like 'o' and 'X' placed above each other. Maybe it's an issue with my font only.
That's correct. It's the generic currency symbol U+00A4: ¤
Created attachment 169126 [details] [review] proposed gtkhtml patch for gtkhtml; It took me some time to realize how it is actually working, but with this patch and a patch to evolution (to be attached) it seems to work as soon as I fix quotation in the META tags in your test email. I'll test with evolution-mapi, whether these two patches will do any issue and if not then I will commit or see what I can do with ema to fix it. Maybe it'll be safer to wait for 2.33 with this, to not break sources at the very beginning?
Created attachment 169127 [details] [review] proposed evo patch for evolution;
Maybe commit after we branch, and if it holds up well for some time on master we could backport to gnome-2-32.
Hm, what if the mail has a Content-Type: header which, rather than having *no* charset specified, has an *incorrect* charset? I have a feeling we convert from that charset to UTF-8 before we ever feed the data to gtkhtml? If we want gtkhtml to handle charset conversion, we mustn't do that. Try turning the inner Content-Type: headers in my test mail to something like: Content-Type: text/html; charset=iso8859-2 How does your patch fare with that?
(In reply to comment #5) > Maybe commit after we branch, and if it holds up well for some time on master > we could backport to gnome-2-32. We've branched now... although see my questions in comment 6.
I have tried testing comment 6, where I changed all the charset header to invalid charsets, but the content was having valid charsets and mail is getting displayed properly.
Milan: So does it still make sense to get this patch in?
(In reply to comment #9) > Milan: So does it still make sense to get this patch in? OK, let's push them in.
Hrm, just tested it, and current git doesn't work with patches added. Thus I'm setting their status accordingly.
Still there with webkit rendering. The patches for evo and gtkhtml are obsolete.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new bug report ticket at https://gitlab.gnome.org/GNOME/evolution/-/issues/ Thank you for your understanding and your help.