Re: [gmime-devel] unexpected rewrapping in long lines



Wow - This is really ringing some bells over here, given issues we'd seen with certain emails - usually at the point of loading headers, and most of the offending email being very UTF-8-ish...

Paul, tks for this confirmation.   

Lou Picciano

----- Original Message -----
From: Paul J Stevens <paul nfg nl>
To: gmime-devel-list gnome org
Sent: Fri, 05 Apr 2013 13:16:10 -0000 (UTC)
Subject: [gmime-devel] unexpected rewrapping in long lines


Jeff,

Below was confirmed on gmime-2.4 and gmime-2.6

When a message with a long utf7 encoded lines passes through gmime every
works as expected, except when a header is added to the message along
the line.

Consider below message. The quotation style was used to preserve indenting.

----
> From: test
> To: test2
> Subject: qqqq wwwwwww [eee 1234]=?UTF-8?Q?=20=D0=95=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=20=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=20=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=20=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC?=
>
> 123
----

when it gets parsed as-is, everything is alright -
g_mime_object_to_string returns the message exactly as fed in.

However, when a header is added after parsing the message, the subject
line in this case gets re-wrapped in what appears to be an incorrect
fashion. At least, thunderbird and other mail clients don't grok it any
more.

Say a header 'X-Test' is set on above message:

g_mime_object_set_header(message->content, "X-Test", "testing");
g_mime_stream_reset(message->stream);
g_mime_object_write_to_stream(message->content, message->stream);

Now if I do g_mime_object_get_headers on the message->content
GMimeMessage object I get:

----
> From: test
> To: test2
> Subject: qqqq wwwwwww [eee
>  1234]=?UTF-8?Q?=20=D0=95=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0
>     =BC=D0=BC=D0=BC=20=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0
>     =BC=D0=BC=D0=BC=D0=BC=D0=BC=20=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0
>     =BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=20=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0
>     =BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC=D0=BC?=
> X-Test: testing
----

and the top-level mime-part also gets encoded as:

> D=0B

Does this ring any bells for you?


--
________________________________________________________________
Paul J Stevens        pjstevns @ gmail, twitter, skype, linkedin

  * Premium Hosting Services and Web Application Consultancy *

           www.nfg.nl/info nfg nl/+31.85.877.99.97
________________________________________________________________
_______________________________________________
gmime-devel-list mailing list
gmime-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gmime-devel-list


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