Re: [gmime-devel] Encoding headers: Is UTF-8 a sane default now?
- From: Michael Gratton <mike vee net>
- To: Jeffrey Stedfast <fejj gnome org>
- Cc: gmime-devel-list gnome org
- Subject: Re: [gmime-devel] Encoding headers: Is UTF-8 a sane default now?
- Date: Fri, 01 Jul 2016 13:17:09 +1000
On Thu, Jun 30, 2016 at 9:05 PM, Jeffrey Stedfast <fejj gnome org>
wrote:
On 6/29/2016 10:36 PM, Michael Gratton wrote:
Thanks for the feedback, guys.
So in terms of init'ing GMime to do the right thing: There's nothing
to do for US-ASCII headers that will always be used if valid to do
so, as long as GMIME_ENABLE_USE_ONLY_USER_CHARSETS is not passed to
gmime_init() it will do the same thing for iso-8859-1, and if I call
g_mime_set_user_charsets() with just UTF-8, it will use that for all
other header strings.
If I do set the user charsets to UTF-8 then I assume that means all
headers will be sent as one of those three - i.e. no
non-ascii/iso-8859-1 header strings will ever be encoded with
something like iso-8859-*, windows-1251 or Shift-JIS, right?
//Mike
I think you're correct, yes.
Cool, thanks.
The gmime-charset-map-private.h list of charsets is used as a way of
figuring out which charsets the header values *could* be encoded into
and the user-charsets list is used to further filter that down to an
"allowed-to-use" subset.
The user-charsets list is also used as a list of charsets to try to
convert from when it encounters undeclared 8bit text in the header
values.
FWIW, I've removed iso-8859-7 from the list and regenerated the
tables in git master, so that should solve the iso-8859-7 issue that
your user has hit.
I did see that, ta. I've had to add a workaround anyway in Geary though
since it'll be a while before it'll hits the distros.
I'd be happy to remove more of them, I just want to be careful about
doing that until we get data for those regions that the iso charsets
have been deprecated and/or we know that the vast majority of clients
used by users in those regions support UTF-8.
Well if it's any indication, Geary seems to have a number of users from
around the world and while it always sends message bodies as UTF-8 I
haven't been able to find a bug complaining about that. In fact, this
issue of sending headers not using UTF-8 is the only thing I have heard.
//Mike
--
⊨ Michael Gratton, Percept Wrangler.
⚙ <http://mjog.vee.net/>
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]