GNOME Bugzilla – Bug 517244
Configure doesn't set HAVE_CODESET
Last modified: 2008-05-05 19:06:47 UTC
When using the locale sv_SE.utf8, evolution by default sends mails claiming they are using charset utf8. That is not the correct name, it should be UTF-8, and some MUA are fooled by the absence of the dash, and displays the mails incorrectly. I tried to understand why, and came to this section in libedataserver/e-iconv.c: #ifdef HAVE_CODESET locale_charset = g_strdup (nl_langinfo (CODESET)); e_strdown (locale_charset); #else /* A locale name is typically of the form language[_terri- * tory][.codeset][@modifier], where language is an ISO 639 * language code, territory is an ISO 3166 country code, and * codeset is a character set or encoding identifier like * ISO-8859-1 or UTF-8. */ char *codeset, *p; codeset = strchr (locale, '.'); if (codeset) { codeset++; /* ; is a hack for debian systems and / is a hack for Solaris systems */ for (p = codeset; *p && !strchr ("@;/", *p); p++); locale_charset = g_strndup (codeset, p - codeset); e_strdown (locale_charset); } else { /* charset unknown */ locale_charset = NULL; } #endif When running evolution in the debugger I find to my surprise that the #else section is used, although my system (Fedora) does have CODESET in langinfo.h. (A trivial two-line test case also confirmed that nl_langinfo(CODESET) indeed does return "UTF-8".) Since the locale name uses "utf8" rather than "utf-8" it explains the behaviour. Looking further, I came to the conclusion that nothing in the configure script defines HAVE_CODESET. I can't find any test for it, and config.h.in doesn't contain it. That, to me, seems like a bug in evolution-data-server. Isn't it?
Bumping version to a stable release.
Created attachment 110195 [details] [review] Stole this from GLib
Test and commit it Matt
Committed to trunk (revision 8738) and gnome-2-22 (revision 8739).