<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.3">
</HEAD>
<BODY>
retitle 506373 Evolution recklessy ignores the charset on text/html email fragments and causes glib's death by ana-utf8-phylactic shock<BR>
thanks<BR>
<BR>
Although the subject line is (correclty) encoded in windows-1252 and appears to contain the offending string, it does not appear to be the cause of trouble. <BR>
<BR>
The offending string can be found in the scrap of html sent by Google as the first MIME part of the message body; quoting&nbsp; the bit:<BR>
<BR>
<BLOCKQUOTE>
    &lt;div style=&quot;width:370px; background:#D2E6D2; border-style:solid;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; border-color:#ccc; border-width:1px 1px 0 1px; padding:15px 15px 5px 15px;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; margin:0 auto&quot;&gt;&lt;p style=&quot;margin:0;color:#0&quot;&gt;<A HREF="mailto:cyrille@chepelov.org">cyrille@chepelov.org</A>,<BR>
    vous &#234;tes invit&#233;(e) &#224; participer &#224;&lt;/p&gt;<BR>
    &lt;h2 style=&quot;margin:5px 0; font-size:18px; line-height:1.4;color:#0&quot;&gt;Concert Paris-Novembre (R&#233;xx Vyyyy&#233;)&lt;/h2&gt;<BR>
    <BR>
</BLOCKQUOTE>
(here, gedit did automatically convert that from ISO-8859-15 to UTF-8, hence none of the diacritics appear mutilated. hexdumping the MIME bit does confirm the ISO-8859-15 encoding:<BR>
<BR>
<TT>000001c0&nbsp; 20 73 74 79 6c 65 3d 22&nbsp; 6d 61 72 67 69 6e 3a 30&nbsp; | style=&quot;margin:0|</TT><BR>
<TT>000001d0&nbsp; 3b 63 6f 6c 6f 72 3a 23&nbsp; 30 22 3e 63 79 72 69 6c&nbsp; |;color:#0&quot;&gt;cyril|</TT><BR>
<TT>000001e0&nbsp; 6c 65 40 63 68 65 70 65&nbsp; 6c 6f 76 2e 6f 72 67 2c&nbsp; |<A HREF="mailto:le@chepelov.org">le@chepelov.org</A>,|</TT><BR>
<TT>000001f0&nbsp; 0a 76 6f 75 73 20 ea 74&nbsp; 65 73 20 69 6e 76 69 74&nbsp; |.vous .tes invit|</TT><BR>
<TT>00000200&nbsp; e9 28 65 29 20 e0 20 70&nbsp; 61 72 74 69 63 69 70 65&nbsp; |.(e) . participe|</TT><BR>
<TT>00000210&nbsp; 72 20 e0 3c 2f 70 3e 0a&nbsp; 3c 68 32 20 73 74 79 6c&nbsp; |r .&lt;/p&gt;.&lt;h2 styl|</TT><BR>
<TT>00000220&nbsp; 65 3d 22 6d 61 72 67 69&nbsp; 6e 3a 35 70 78 20 30 3b&nbsp; |e=&quot;margin:5px 0;|</TT><BR>
<TT>00000230&nbsp; 20 66 6f 6e 74 2d 73 69&nbsp; 7a 65 3a 31 38 70 78 3b&nbsp; | font-size:18px;|</TT><BR>
<TT>00000240&nbsp; 20 6c 69 6e 65 2d 68 65&nbsp; 69 67 68 74 3a 31 2e 34&nbsp; | line-height:1.4|</TT><BR>
<TT>00000250&nbsp; 3b 63 6f 6c 6f 72 3a 23&nbsp; 30 22 3e 43 6f 6e 63 65&nbsp; |;color:#0&quot;&gt;Conce|</TT><BR>
<TT>00000260&nbsp; 72 74 20 50 61 72 69 73&nbsp; 2d 4e 6f 76 65 6d 62 72&nbsp; |rt Paris-Novembr|</TT><BR>
<TT>00000270&nbsp; 65 20 28 52 </TT><TT><B>e9</B></TT><TT> 78 78 20&nbsp; 56 79 79 79 79 </TT><TT><B>e9</B></TT><TT> 29 3c&nbsp; |e (R</TT><TT><B>.</B></TT><TT>xx Vyyyy</TT><TT><B>.</B></TT><TT>)&lt;|</TT><BR>
<BR>
Inspecting the raw RFC-2822 message, it appears that the bit of HTML <U>does have</U> content-type Content-Type: text/html; charset=windows-1252. While I regret that Google did not include redundant metadata within the text/html bit, there not only there was proper warning that utf-8 this was not, but also the default encoding <B>was</B> set to be 8859-15. Therefore, what happened is that <B>Evolution failed to properly convert this fragment into proper UTF-8 before handing it over to glib</B> (and in any case, it definitely should have bleached it to not provide an invalid UTF-8 fragment down the HTML renderer). Assigning the blame on Evolution for sure.<BR>
<BR>
I will gladly provide the raw RFC-2822 offending message, but on a non-disclosure basis.<BR>
<BR>
Thanks in advance.<BR>
<BR>
&nbsp;&nbsp;&nbsp; -- Cyrille<BR>
<BR>
</BODY>
</HTML>