After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624234 - Mailer doesn't honour charset in <META HTTP-EQUIV> when rendering mails.
Mailer doesn't honour charset in <META HTTP-EQUIV> when rendering mails.
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Mailer
3.6.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-07-13 10:39 UTC by David Woodhouse
Modified: 2021-05-19 12:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test mail (1.02 KB, text/plain)
2010-07-13 10:39 UTC, David Woodhouse
  Details
proposed gtkhtml patch (939 bytes, patch)
2010-08-30 20:28 UTC, Milan Crha
needs-work Details | Review
proposed evo patch (975 bytes, patch)
2010-08-30 20:29 UTC, Milan Crha
needs-work Details | Review

Description David Woodhouse 2010-07-13 10:39:42 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...
Comment 1 Milan Crha 2010-07-14 13:46:35 UTC
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.
Comment 2 David Woodhouse 2010-07-15 00:52:42 UTC
That's correct. It's the generic currency symbol U+00A4: ¤
Comment 3 Milan Crha 2010-08-30 20:28:31 UTC
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?
Comment 4 Milan Crha 2010-08-30 20:29:12 UTC
Created attachment 169127 [details] [review]
proposed evo patch

for evolution;
Comment 5 Matthew Barnes 2010-08-30 21:02:11 UTC
Maybe commit after we branch, and if it holds up well for some time on master we could backport to gnome-2-32.
Comment 6 David Woodhouse 2010-08-31 09:17:52 UTC
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?
Comment 7 David Woodhouse 2010-09-20 11:14:14 UTC
(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.
Comment 8 Vibha Yadav 2011-04-20 08:08:05 UTC
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.
Comment 9 André Klapper 2012-02-02 18:32:06 UTC
Milan: So does it still make sense to get this patch in?
Comment 10 Milan Crha 2012-02-03 10:33:37 UTC
(In reply to comment #9)
> Milan: So does it still make sense to get this patch in?

OK, let's push them in.
Comment 11 Milan Crha 2012-02-03 12:32:32 UTC
Hrm, just tested it, and current git doesn't work with patches added. Thus I'm setting their status accordingly.
Comment 12 Milan Crha 2012-04-23 06:47:18 UTC
Still there with webkit rendering. The patches for evo and gtkhtml are obsolete.
Comment 13 André Klapper 2021-05-19 12:12:41 UTC
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.