<<< Date Index >>>     <<< Thread Index >>>

Wrong Patch For UTF-8 Issues :-(



Well, this is technically not really what you're looking for, but it's
the patch I had in mind.  It shouldn't help you one bit, though, in this
particular case :-(

 - Dave


----- Forwarded message from "Kirill A. Shutemov" <kas@xxxxxxxxxxx> -----

Date: Tue, 09 Dec 2003 08:39:10 +0200
From: "Kirill A. Shutemov" <kas@xxxxxxxxxxx>
Subject: rfc2047
To: mutt-dev@xxxxxxxx
User-Agent: Mutt/1.4.1i

If letter has subject like '=?koi8-r?Q?=F2=C1=D3=D3=D9=CC=CB=C1 OZ.by
04.12.2003?=' i. e. wrong encoded(Don't conform to rfc2047 becouse contain
spaces), Mutt cannot display it correctly. Attached patch allows correctly
decode wrong MIME subject within spaces and tabs.

--- rfc2047.c.orig      2003-12-07 21:27:59 +0200
+++ rfc2047.c   2003-12-07 22:08:40 +0200
@@ -700,12 +700,12 @@
   while ((p = strstr (q, "=?")))
   {
     for (q = p + 2;
-        0x20 < *q && *q < 0x7f && !strchr ("()<>@,;:\"/[]?.=", *q);
+        *q == 0x09 || (0x20 <= *q && *q < 0x7f && !strchr ("()<>@,;:\"/[]?.=", 
*q));
         q++)
       ;
     if (q[0] != '?' || !strchr ("BbQq", q[1]) || q[2] != '?')
       continue;
-    for (q = q + 3; 0x20 < *q && *q < 0x7f && *q != '?'; q++)
+    for (q = q + 3; *q == 0x09 || (0x20 <= *q && *q < 0x7f && *q != '?'); q++)
       ;
     if (q[0] != '?' || q[1] != '=')
     {




----- End forwarded message -----

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgp1VcoFFHWl9.pgp
Description: PGP signature