Re: [gmime-devel] Email parsing functions flawed and not practical to use



On Wed, Aug 25, 2010 at 09:44:22PM -0400, Jeffrey Stedfast wrote:
> Hi Damien,
> 
> I've got a patch (attached)  that fixes a few of your issues already and
> (hopefully) doesn't break anything else... (the test suit passes, at least).

A big patch, thanks. It fixed the issues you're listing and is a good
progress.

> The following example is going to be problematic, I think:
> Email: =?UTF-8?Q?agatest123_"test"?= <aga aga>

If g_mime_utils_header_decode_phrase() will be more liberal it should
not be a problem. Can we make it to accept any non white space character
as a word's character instead of only atoms?

> The good news is that I *think* that the following example should be
> doable...
> Email: "=?ISO-8859-2?Q?TEST?=" <p p org>
> 
> This last one will likely require changes to header_decode_phrase().
> I'll try looking into this one in the next few days.

I think it's just matter of unquoting strings before decoding encoded
words. _internet_address_decode_name() should only do decoding,
unquoting should be done only in decode_address(). Since it uses
decode_word() that handles unquoting it should work, but I don't know
why it's not true.


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