/* Define if we are using the system's wchar_t functions. */
#undef HAVE_WC_FUNCS
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
AC_DEFINE(HAVE_WC_FUNCS)
fi
+AC_CACHE_CHECK([for nl_langinfo and CODESET], mutt_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ mutt_cv_langinfo_codeset=yes,
+ mutt_cv_langinfo_codeset=no)])
+if test $mutt_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET)
+fi
+
AC_OUTPUT(Makefile intl/Makefile m4/Makefile dnl
po/Makefile.in doc/Makefile contrib/Makefile dnl
muttbug.sh dnl
#include <errno.h>
#include <sys/wait.h>
+#ifdef HAVE_LANGINFO_CODESET
+#include <langinfo.h>
+#endif
+
void toggle_quadoption (int opt)
{
int n = opt/4;
else if (DTYPE (MuttVars[idx].type) == DT_STR)
{
*((char **) MuttVars[idx].data) = safe_strdup (tmp->data);
- mutt_set_charset (Charset);
+ if (mutt_strcmp (MuttVars[idx].option, "charset") == 0)
+ mutt_set_charset (Charset);
}
else
{
FREE (&token.data);
}
+#ifdef HAVE_LANGINFO_CODESET
+ Charset = safe_strdup (nl_langinfo (CODESET));
+#else
+ Charset = safe_strdup ("iso-8859-1");
+#endif
+
+ mutt_set_charset (Charset);
+
+
/* Set standard defaults */
for (i = 0; MuttVars[i].option; i++)
{
CurrentMenu = MENU_MAIN;
+
#ifndef LOCALES_HACK
/* Do we have a locale definition? */
if (((p = getenv ("LC_ALL")) != NULL && p[0]) ||
** When this variable is set, mutt will include Delivered-To headers when
** bouncing messages. Postfix users may wish to unset this variable.
*/
- { "charset", DT_STR, R_NONE, UL &Charset, UL "iso-8859-1" },
+ { "charset", DT_STR, R_NONE, UL &Charset, UL 0 },
/*
** .pp
** Character set your terminal uses to display and enter textual data.