Re: HOWTO: RFC 2047 encoding of From: header?
- From: Jeffrey Stedfast <fejj stampede org>
- To: Pawel Salek <pawsa theochem kth se>
- Cc: Albrecht Dreß <albrecht dress arcor de>, Balsa-Liste <balsa-list gnome org>
- Subject: Re: HOWTO: RFC 2047 encoding of From: header?
- Date: Sun, 04 Jul 2004 16:43:52 -0400
On Sun, 2004-07-04 at 19:29 +0000, Pawel Salek wrote:
> On 07/04/2004 07:08:05 PM, Albrecht Dreß wrote:
> > Hi Jeff,
> >
> > I noticed that using the gmime cvs, the From: header (and maybe
> > others, too?) is not properly RFC 2047 encoded by default, i.e. the
> > sequence
> > <snip>
> > msg = g_mime_message_new(TRUE);
> > g_mime_message_set_sender(msg, "Albrecht Dreß
> > <albrecht dress arcor de>");
> > cont = g_mime_object_to_string(GMIME_OBJECT(msg));
> > </snip>
> > leaves "From: Albrecht Dre\xdf <albrecht dress arcor de>" in the
> > returned string, which obviously violates RFC 2047. Is this the
> > expected behaviour?
>
> I see this incorrect behaviour with 2.1.3, too.
>
>
> > How do I trigger RFC 2047 conversion with gmime, if possible
> > automatically (note for Balsa: HEAD using gmime cvs sends bad From:
> > headers!)?
>
> I guess we can explicitely use g_mime_utils_header_encode_phrase()
> before calling g_mime_message_set_sender() but this would be just
> guessing: GMIME does not mention that the passed string must be 7-bit.
> Jeff, what do you think?
it expected it to be pre-encoded but I think that, in hindsight, this
was a bad idea. I've modified CVS to parse the address string and then
encode it itself so that this assumption is no longer needed.
I wonder if maybe a better interface would have been to take an
InternetAddressList instead of a string. oh well.
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]