Always use UTF-8 for encoding non-ASCII/ISO-8859-1 headers. Bug 753870.

While message bodies are always sent as UTF-8, non ASCII/ISO-8859-1
headers were being encoded using GMime's default heuristics. This
uses some less-well-supported charsets and causing some rendering
issues in other less tolerant client.

Since we assume UTF-8 support for the body, assume it for headers as
well.

* src/engine/rfc822/rfc822.vala (Geary.RFC822.init): Set GMime user
  charsets to UTF-8.

* bindings/vapi/gmime-2.6.vapi (GMime): Fix binding for
  g_mime_set_user_charsets.
This commit is contained in:
Michael James Gratton 2016-06-30 15:29:39 +10:00
parent 7166c15ea3
commit f10f898ab0
2 changed files with 9 additions and 3 deletions

View file

@ -1342,7 +1342,7 @@ namespace GMime {
[CCode (cheader_filename = "gmime/gmime.h", cname = "g_mime_locale_language")]
public static unowned string locale_language ();
[CCode (cheader_filename = "gmime/gmime.h", cname = "g_mime_set_user_charsets")]
public static void set_user_charsets (out unowned string charsets);
public static void set_user_charsets ([CCode (array_length = false)] string[] charsets);
[CCode (cheader_filename = "gmime/gmime.h", cname = "g_mime_shutdown")]
public static void shutdown ();
[CCode (cheader_filename = "gmime/gmime.h", cname = "g_mime_user_charsets")]