From: Thomas Roessler Date: Wed, 15 Nov 2000 20:29:58 +0000 (+0000) Subject: Fix langinfo-based character set detection. From Martin Norbäck X-Git-Tag: mutt-1-3-12-rel~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d83c672d4f54cd2c3129b71352b425654d2890ba;p=mutt Fix langinfo-based character set detection. From Martin Norbäck . --- diff --git a/charset.c b/charset.c index ab03225c..e7146f3e 100644 --- a/charset.c +++ b/charset.c @@ -200,7 +200,7 @@ void mutt_set_langinfo_charset (void) mutt_canonical_charset (buff2, sizeof (buff2), buff); /* finally, set $charset */ - if (!(Charset = safe_strdup (buff))) + if (!(Charset = safe_strdup (buff2))) Charset = safe_strdup ("iso-8859-1"); } @@ -223,7 +223,7 @@ void mutt_canonical_charset (char *dest, size_t dlen, const char *name) if (!mutt_strncasecmp (name, "iso8859", 7) && name[7] != '-') snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 7); else if (!mutt_strncasecmp (name, "iso8859-", 8)) - snprintf (scratch, sizeof (scratch), "iso8859-%s", name + 8); + snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 8); else strfcpy (scratch, NONULL(name), sizeof (scratch));