From: Thomas Roessler Date: Tue, 13 Feb 2001 23:07:48 +0000 (+0000) Subject: Add more possibly-interesting character set names. X-Git-Tag: mutt-1-3-16-rel~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40b5e53fe033d170482e58fa57e96146e4401be7;p=mutt Add more possibly-interesting character set names. --- diff --git a/charset.c b/charset.c index 34a8f02c..b26cf6e3 100644 --- a/charset.c +++ b/charset.c @@ -222,7 +222,11 @@ void mutt_canonical_charset (char *dest, size_t dlen, const char *name) char scratch[LONG_STRING]; /* catch some common iso-8859-something misspellings */ - if (!mutt_strncasecmp (name, "iso8859", 7) && name[7] != '-') + if (!mutt_strncasecmp (name, "8859", 4) && name[4] != '-') + snprintf (scratch, sizeof (scratch), "iso-8859-%s", name +4); + else if (!mutt_strncasecmp (name, "8859-", 5)) + snprintf (scratch, sizeof (scratch), "iso-8859-%s", name + 5); + else 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), "iso_8859-%s", name + 8);