This patch is completely untested apart from it compiling with no warnings. It wont be committed if someone can't get off their lazy bum and at least test it. And fix it up to an acceptable level if it needs fixing. You might have to read rfc2047 to make it work/test it too, since it needs to work properly with valid emails.
I wont be spending any more time on this until someone else does (and Jeff, don't touch it!), and if they don't, I guess nobody cares enough do they?
On Mon, 2004-05-24 at 04:42 +0800, cantona wrote:
Hi, See http://bugzilla.ximian.com/show_bug.cgi?id=58555 http://bugzilla.ximian.com/show_bug.cgi?id=58691 Anyway, I asked someone that he said since there are mainly mailer parsed the mistake encoding so it must also a pressure to Evolution to maintain the decoding to the broken encode-word. Regards, Cantona On Sun, 2004-05-23 at 21:17 +0200, Bjørn T Johansen wrote: > Hi.. > > I have been using Evolution awhile but lately I have been using > Thunderbird because of two things that annoys me about Evolution. > And I have just downloaded the latest development snapshot for SuSE 9.1 > but sadly, the two things are still there... > > Mainly, evol. doesn't show every mail correctly regarding character > enconding.. Some mail looks like this..: > > Subject: > Hva som skal st=?ISO-8859-1?B?5Q==?= > I mail som sendes u > > Why isn't this shown like this ??: > > Subject: Hva som skal stå I mail som sendes u > > > This works like charm with both thunderbird and also kmail. > > > Second, why isn't there an option that make it possible to enable "hard" > delete of mail instead of delete and then have to press Ctrl-E to > expunge the mail. This should be a small task to implement, the code is > already there, just combine it... :) > > > And also, when using IMAP, why isn't the seen flag marked when I have > read the email? I have to eg. go to another folder en back again to make > sure the mail is marked as read.. > > > I must say that I really like Evolution and I like the look of the new > 2.0 version but until these things are fixed, thunderbird is my game... > > > Regards, > > BTJ > _______________________________________________ evolution maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/evolution
|
<<attachment: zed-48.small.jpg>>
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2146
diff -u -3 -r1.2146 ChangeLog
--- camel/ChangeLog 24 May 2004 08:02:10 -0000 1.2146
+++ camel/ChangeLog 24 May 2004 11:18:50 -0000
@@ -1,5 +1,11 @@
2004-05-24 Not Zed <[EMAIL PROTECTED]>
+ * camel-mime-utils.c (header_decode_text): Crap interoperability
+ fix for a crap interoperability problem with BROKEN emailers.
+ Totally untested. See #58555.
+
+2004-05-24 Not Zed <[EMAIL PROTECTED]>
+
* camel-mime-utils.c (camel_header_newsgroups_decode):
fix/rearrange logic. It was using the wrong working pointer.
Index: camel/camel-mime-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-utils.c,v
retrieving revision 1.208
diff -u -3 -r1.208 camel-mime-utils.c
--- camel/camel-mime-utils.c 24 May 2004 08:02:10 -0000 1.208
+++ camel/camel-mime-utils.c 24 May 2004 11:18:52 -0000
@@ -1147,18 +1147,38 @@
while (inptr < inend && !camel_mime_is_lwsp(*inptr))
inptr++;
- dword = rfc2047_decode_word(start, inptr-start);
- if (dword) {
- g_string_append(out, dword);
- g_free(dword);
- } else {
+ /* interofuxedability fix for non rfc compliant i18n mailers */
+ do {
+ const char *enc, *end;
+
+ enc = strstr(start, "=?");
+ if (enc
+ && enc < inptr) {
+ if (enc == start
+ && (end = strstr(enc+2, "?="))
+ && end < (inptr-2)
+ && (dword = rfc2047_decode_word(start, end-start+2))) {
+ g_string_append(out, dword);
+ g_free(dword);
+ start = end + 2;
+ chunk = start;
+ continue;
+ } else {
+ end = enc;
+ }
+ } else {
+ end = inptr;
+ }
+
if (!chunk)
chunk = start;
- if ((default_charset == NULL || !append_8bit (out, chunk, inptr-chunk, default_charset))
- && (locale_charset == NULL || !append_8bit(out, chunk, inptr-chunk, locale_charset)))
- append_latin1(out, chunk, inptr-chunk);
- }
+ if ((default_charset == NULL || !append_8bit (out, chunk, end-chunk, default_charset))
+ && (locale_charset == NULL || !append_8bit(out, chunk, end-chunk, locale_charset)))
+ append_latin1(out, chunk, end-chunk);
+
+ start = end;
+ } while (start < inptr);
chunk = NULL;
}
