Re: [Evolution-hackers] [patch] fixed incorrect rfc2047 decodefor CJKheader



>>> Peter Volkov <pva gentoo org> 12/24/07 2:07 AM >>>
> В Пнд, 24/12/2007 в 13:21 +0800, jacky пишет:
> > --- Jeff Stedfast <fejj novell com>wrote:
> > There are two kind of email need to support:
> > 1) An encoded-word was divided into two line. This was
> > sent by dotProject v2.0.1 .
> 
> And there are even more users affected by this. I've already reported
> similar problem in bug 315513. Thus this affects not only CJK people:
> 
> http://bugzilla.gnome.org/show_bug.cgi?id=315513

I may be misunderstanding Jacky, here, but my understanding is that he means something like this:


Subject: =?gb2312?B?DhfkKYWE8etfOIYDlSJUdfK263pHDK<break>
             DhfLW&ERO8S743fjF=?=

Which is not the same as the bug you reported which is just extreme stupidity in the sending client's implementation. Your particular bug is about clients who break a single (multi-byte) character across multiple encoded-word tokens which is strictly forbidden in rfc2047.

My above example is also forbidden, but at least an excuse can be made in saying that the clients (or some other piece of software's) line-break logic was applied after the encoded-word was created and the line-breaking code saw fit to break it as a long word.

Anyways, as I mentioned a few months ago - there's a beautiful implementation that works around a bunch of the common rfc2047 brokenness that I wrote in GMime which has been getting field-tested for a while now. It would be great if someone were so inclined to port that code over to Camel.

Jacky: You could even test to make sure it works around the broken messages in your Inbox by running gmime/tests/test-mbox on it (assuming the brokenness is in the Subject header which is one of the values it prints out... if not, feel free to add From/To/Cc fields to the output as well to check the results).

You'll probably want to apply a similar gb2312->GBK fix to gmime/gmime/gmime-charset.c if you use a released tarball of GMime to test (I've applied it locally on my machine and will commit to svn shortly), otherwise you can grab svn from gnome's svn server and try that.

Jeff



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]