Re: [gmime-devel] Porting code from gmime 2.6 to 3.0
- From: Jeffrey Stedfast <fejj gnome org>
- To: Casper Langemeijer <casper langemeijer eu>, "gmime-devel-list gnome org" <gmime-devel-list gnome org>
- Subject: Re: [gmime-devel] Porting code from gmime 2.6 to 3.0
- Date: Tue, 1 May 2018 10:23:51 -0400
Hi Casper,
Thanks for reaching out. Let me try to answer your questions...
On 4/30/2018 6:43 PM, Casper Langemeijer wrote:
I'm making an attempt to rewrite dbmail from using gmime 3.0 instead
of 2.6.
So far I think I'm making good progress, but I can't seem to figure
out how to deal the following issue.
dbmail has:
g_mime_init(GMIME_ENABLE_RFC2047_WORKAROUNDS);
I cannot find any old documentation about what that meant.
What that did was it made the rfc2047 parser/decoder less strict in its
tokenizing of headers such that the more common buglets that mail
software had could be more easily worked around.
I'm assuming the 3.0 equivalent of this must be
g_mime_parser_options_set_rfc2047_compliance_mode(options,
GMIME_RFC_COMPLIANCE_LOOSE) or
g_mime_parser_options_set_rfc2047_compliance_mode(options,
GMIME_RFC_COMPLIANCE_STRICT)
but which one is it?
You were definitely on the right track! The setting you are looking for
is the LOOSE value.
That being said, the default values for all parser compliance settings
is LOOSE, so you don't need to actually mess with that.
That also means that you can pass NULL as the 'options' argument to all
of the GMime API's that take a GMimeParserOptions parameter.
I'm not sure if dbmail uses the old g_mime_set_user_charsets() APIs or
not, but if it does, the GMimeParserOptions is where to set those
fallback charsets now. I figured I'd mention that since that might not
be super obvious.
If you have any more questions, let me know and I'll try to help you out,
Jeff
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]