<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Check for ISO-8859-1/Windows-1252 improper charset labeling</title> 
  <pubDate>Fri, 10 Apr 2026 13:09:16 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9201</link> 
  <atom:link rel="self" type="application/rss+xml" title="Check for ISO-8859-1/Windows-1252 improper charset labeling" href="https://bugs.horde.org/ticket/9201/rss" /> 
  <description>Check for ISO-8859-1/Windows-1252 improper charset labeling</description> 
 
   
   
  <item> 
   <title>Placing in IMP queue for now.

Not sure if this is somethi</title> 
   <description>Placing in IMP queue for now.

Not sure if this is something we should do in Horde_String or in IMP.  Possible ideas:
1. Always treat ISO-8859-1 data as windows-1252
2. Look at X-mailer (or equivalent) and if it looks like Outlook, do #1.
3. For ISO-8859-1 parts, check for 0x80 to 0x9F characters and, if found, change charset representation to windows-1252</description> 
   <pubDate>Wed, 25 Aug 2010 18:58:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59736</link> 
  </item> 
   
  <item> 
   <title>&gt; 3. For ISO-8859-1 parts, check for 0x80 to 0x9F characters</title> 
   <description>&gt; 3. For ISO-8859-1 parts, check for 0x80 to 0x9F characters and, if 
&gt; found, change charset representation to windows-1252

This sounds like the most stable solution to me.</description> 
   <pubDate>Wed, 25 Aug 2010 19:34:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59739</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Ticket #9201</title> 
   <description>Changes have been made in Git for this ticket:

Ticket #9201: Better to convert things to UTF-8, to prevent lossy conversion.

http://git.horde.org/diff.php/framework/Support/lib/Horde/Support/Domhtml.php?rt=horde-git&amp;r1=6149c84e973f3fb5c61760834c148bae4cbf04b8&amp;r2=699d059d4fa0faeed9273862ce3e19474bb8fd2d</description> 
   <pubDate>Wed, 25 Aug 2010 19:36:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59740</link> 
  </item> 
   
  <item> 
   <title>This change *seems* to fix the conversion issues for me.  Al</title> 
   <description>This change *seems* to fix the conversion issues for me.  Although that could just be fortune that we are not doing any ISO-8859-1 conversions in the codepaths I have tested.</description> 
   <pubDate>Wed, 25 Aug 2010 19:39:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59741</link> 
  </item> 
   
  <item> 
   <title>&gt; This change *seems* to fix the conversion issues for me.  </title> 
   <description>&gt; This change *seems* to fix the conversion issues for me.  Although 
&gt; that could just be fortune that we are not doing any ISO-8859-1 
&gt; conversions in the codepaths I have tested.

I still have problems with the euro sign.

Using IMP : 
compose a new text message and set charset to UTF-8. Send the following string : &quot;azerty &quot;
the received message looks fine in IMP, Thunderbird and Outlook.

compose a new HTML message and set charset to UTF-8. Send the following string : &quot;azerty &quot;
the HTML part looks ok and render just fine in Outlook and Thunderbird, but not IMP. I get this with IMP/FF : &quot;azerty â¬&quot;

Looking at the source of the message, the encoded string doesn&#039;t look the same in the text part  :

--=_MgggdEx2InJNFCIGJXUlY0k0
Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes
Content-Description: Plaintext Version
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

azerty =C3=A2=C2=82=C2=AC


--=_MgggdEx2InJNFCIGJXUlY0k0
Content-Type: text/html; charset=UTF-8
Content-Description: HTML Version
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=3D&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;!--a75c305b1c0a6022--&gt;&lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body style=3D&quot;font-family:Arial;font-size:14px&quot;&gt;
&lt;p&gt;azerty =E2=82=AC&lt;br /&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
--=_MgggdEx2InJNFCIGJXUlY0k0--


</description> 
   <pubDate>Thu, 26 Aug 2010 07:38:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59746</link> 
  </item> 
   
  <item> 
   <title>&gt; compose a new HTML message and set charset to UTF-8. Send </title> 
   <description>&gt; compose a new HTML message and set charset to UTF-8. Send the following string : &quot;azerty &quot;
&gt; the HTML part looks ok and render just fine in Outlook and 
&gt; Thunderbird, but not IMP. I get this with IMP/FF : &quot;azerty â¬&quot;

Actually, any accent aren&#039;t render correctly at all.
</description> 
   <pubDate>Thu, 26 Aug 2010 07:52:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59748</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; compose a new HTML message and set charset to UTF-8. Send</title> 
   <description>&gt;&gt; compose a new HTML message and set charset to UTF-8. Send the 
&gt;&gt; following string : &quot;azerty &quot;
&gt;&gt; the HTML part looks ok and render just fine in Outlook and
&gt;&gt; Thunderbird, but not IMP. I get this with IMP/FF : &quot;azerty â¬&quot;
&gt;
&gt; Actually, any accent aren&#039;t render correctly at all.

Nope - works perfectly here.  You are going to have to trace down where the text is being mangled on your system.</description> 
   <pubDate>Thu, 26 Aug 2010 16:19:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59749</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; This change *seems* to fix the conversion issues for me. </title> 
   <description>&gt;&gt; This change *seems* to fix the conversion issues for me.  Although
&gt;&gt; that could just be fortune that we are not doing any ISO-8859-1
&gt;&gt; conversions in the codepaths I have tested.
&gt;
&gt; I still have problems with the euro sign.
&gt;
&gt; Using IMP :
&gt; compose a new text message and set charset to UTF-8. Send the following string : &quot;azerty &quot;
&gt; the received message looks fine in IMP, Thunderbird and Outlook.
&gt;
&gt; compose a new HTML message and set charset to UTF-8. Send the following string : &quot;azerty &quot;
&gt; the HTML part looks ok and render just fine in Outlook and 
&gt; Thunderbird, but not IMP. I get this with IMP/FF : &quot;azerty â¬&quot;
&gt;
&gt; Looking at the source of the message, the encoded string doesn&#039;t look 
&gt; the same in the text part  :
&gt;
&gt; --=_MgggdEx2InJNFCIGJXUlY0k0
&gt; Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes
&gt; Content-Description: Plaintext Version
&gt; Content-Disposition: inline
&gt; Content-Transfer-Encoding: quoted-printable
&gt;
&gt; azerty =C3=A2=C2=82=C2=AC
&gt;
&gt;
&gt; --=_MgggdEx2InJNFCIGJXUlY0k0
&gt; Content-Type: text/html; charset=UTF-8
&gt; Content-Description: HTML Version
&gt; Content-Disposition: inline
&gt; Content-Transfer-Encoding: quoted-printable
&gt;
&gt; &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
&gt;     &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&gt; &lt;html xmlns=3D&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&gt; &lt;head&gt;
&gt; &lt;!--a75c305b1c0a6022--&gt;&lt;title&gt;&lt;/title&gt;
&gt; &lt;/head&gt;
&gt; &lt;body style=3D&quot;font-family:Arial;font-size:14px&quot;&gt;
&gt; &lt;p&gt;azerty =E2=82=AC&lt;br /&gt;&lt;/p&gt;
&gt; &lt;/body&gt;
&gt; &lt;/html&gt;
&gt; --=_MgggdEx2InJNFCIGJXUlY0k0--

I see exactly the same behavior. And there are actually two errors.
1) the plain text is double encoded, i.e. the euro sign is turned into =C3=A2=C2=82=C2=AC while it&#039;s still correct in the html part (=E2=82=AC)
2) even though it&#039;s correct in the mail part, it&#039;s not displayed correctly, i.e. as &quot;â¬&quot;</description> 
   <pubDate>Thu, 26 Aug 2010 16:53:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59756</link> 
  </item> 
   
  <item> 
   <title>&gt; I see exactly the same behavior. And there are actually tw</title> 
   <description>&gt; I see exactly the same behavior. And there are actually two errors.
&gt; 1) the plain text is double encoded, i.e. the euro sign is turned 
&gt; into =C3=A2=C2=82=C2=AC while it&#039;s still correct in the html part 
&gt; (=E2=82=AC)
&gt; 2) even though it&#039;s correct in the mail part, it&#039;s not displayed 
&gt; correctly, i.e. as &quot;â¬&quot;

Still works for me.  Here&#039;s what my test message looks like.  Sent via dimp/HTML compose:

----

Subject: Test
Content-Type: multipart/alternative; boundary=&quot;=_GSd1CTVMdqosdDl3SYlomXUo&quot;
MIME-Version: 1.0

This message is in MIME format.

--=_GSd1CTVMdqosdDl3SYlomXUo
Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes
Content-Description: Plaintext Version
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Euro Character: =E2=82=AC =E2=82=AC

--=_GSd1CTVMdqosdDl3SYlomXUo
Content-Type: text/html; charset=UTF-8
Content-Description: HTML Version
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=3D&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;!--a75c305b1c0a6022--&gt;&lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body style=3D&quot;font-family:Arial;font-size:14px&quot;&gt;
&lt;p&gt;Euro Character: &lt;span style=3D&quot;font-size: 14px;&quot;&gt;=E2=82=AC =E2=82=AC&lt;/span&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
--=_GSd1CTVMdqosdDl3SYlomXUo--</description> 
   <pubDate>Thu, 26 Aug 2010 17:56:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59760</link> 
  </item> 
   
  <item> 
   <title>My guess is that there is something weird going on with the </title> 
   <description>My guess is that there is something weird going on with the DOM encoding/loading.  It seems to be working perfect on my system - but that could be because I am using en_US.UTF-8.  It might not be working properly on, e.g., de or fr locales.

I would suggest playing around with charsets in Horde_Domhtml (located in the horde/Util package).</description> 
   <pubDate>Thu, 26 Aug 2010 18:03:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59761</link> 
  </item> 
   
  <item> 
   <title>&gt; My guess is that there is something weird going on with th</title> 
   <description>&gt; My guess is that there is something weird going on with the DOM 
&gt; encoding/loading.  It seems to be working perfect on my system - but 
&gt; that could be because I am using en_US.UTF-8.  It might not be 
&gt; working properly on, e.g., de or fr locales.
&gt;
&gt; I would suggest playing around with charsets in Horde_Domhtml 
&gt; (located in the horde/Util package).

For reference... when I view the HTML part in a new window, Horde_Domhtml is called once.  The initial loadHTML() call fails as the encoding is not auto-determined.  It then moves into the forced loadHTML() call after converting to UTF-8.  The charset passed into the constructor is UTF-8.

Pseudocode:

public function __construct($text, &#039;UTF-8)
{
        $doc = new DOMDocument();
        $doc-&gt;loadHTML($text);

        // $doc-&gt;encoding is empty
        $this-&gt;encoding = $doc-&gt;encoding;

        if (!is_null($charset)) {
            if (!$doc-&gt;encoding) {
                $doc-&gt;loadHTML(&#039;&lt;?xml encoding=&quot;UTF-8&quot;&gt;&#039; . Horde_String::convertCharset($text, $charset, &#039;UTF-8&#039;));
                $this-&gt;encoding = &#039;UTF-8&#039;;
            }
        }
}</description> 
   <pubDate>Thu, 26 Aug 2010 18:08:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59762</link> 
  </item> 
   
  <item> 
   <title>FWIW I sent the message with IMP, not DIMP.</title> 
   <description>FWIW I sent the message with IMP, not DIMP.</description> 
   <pubDate>Thu, 26 Aug 2010 20:31:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59764</link> 
  </item> 
   
  <item> 
   <title>&gt; FWIW I sent the message with IMP, not DIMP.

No differen</title> 
   <description>&gt; FWIW I sent the message with IMP, not DIMP.

No difference for me - still works fine.</description> 
   <pubDate>Thu, 26 Aug 2010 20:43:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59765</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; FWIW I sent the message with IMP, not DIMP.
&gt;
&gt; No diff</title> 
   <description>&gt;&gt; FWIW I sent the message with IMP, not DIMP.
&gt;
&gt; No difference for me - still works fine.

Everything is fine now.

I tried so many things that I&#039;m not sure what did it for me, but my guess is the update of php from 5.3.2 to 5.3.3
Can this ticket be related to php bug #50661 ?

I now run  php-5.3.3-1.el5.remi on CentOS release 5.4

</description> 
   <pubDate>Fri, 27 Aug 2010 12:38:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59770</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; FWIW I sent the message with IMP, not DIMP.
&gt;&gt;
&gt;&gt; No d</title> 
   <description>&gt;&gt;&gt; FWIW I sent the message with IMP, not DIMP.
&gt;&gt;
&gt;&gt; No difference for me - still works fine.
&gt;
&gt; Everything is fine now.

Jan - looks like you are the only one still seeing this.  Have you tried upgrading PHP?</description> 
   <pubDate>Sun, 29 Aug 2010 00:48:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59772</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Ticket #9201</title> 
   <description>Changes have been made in Git for this ticket:

Ticket #9201: Treat ISO-8859-1 as windows-1252

http://git.horde.org/diff.php/imp/lib/Contents.php?rt=horde-git&amp;r1=a2e63c9945413bc8d0487ded4a6f505ad6d20386&amp;r2=74cc881c526c261d9acfc7ccfbaf3a4e7009141e</description> 
   <pubDate>Sun, 29 Aug 2010 00:51:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59773</link> 
  </item> 
   
  <item> 
   <title>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Ticke</title> 
   <description>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Ticket #9201: Treat ISO-8859-1 as windows-1252

I&#039;ve gone ahead and committed this - doing a bit of research, a bunch of mailers do a similar thing.  I think that scanning for the unused 8859-1 codepoints is too much overhead.</description> 
   <pubDate>Sun, 29 Aug 2010 00:53:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59774</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Ticket #9201</title> 
   <description>Changes have been made in Git for this ticket:

Ticket #9201: part might not exist

http://git.horde.org/diff.php/imp/lib/Contents.php?rt=horde-git&amp;r1=74cc881c526c261d9acfc7ccfbaf3a4e7009141e&amp;r2=fad70e02a52d0c9d80172c6c61b28f8765856e48</description> 
   <pubDate>Mon, 30 Aug 2010 17:41:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t59778</link> 
  </item> 
   
  <item> 
   <title>Things seem to be working well with this fix.  Resolving tic</title> 
   <description>Things seem to be working well with this fix.  Resolving ticket.</description> 
   <pubDate>Thu, 21 Oct 2010 06:09:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9201#t60514</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
