]> granicus.if.org Git - mutt/commitdiff
Add more possibly-interesting character set names.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 13 Feb 2001 23:07:48 +0000 (23:07 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 13 Feb 2001 23:07:48 +0000 (23:07 +0000)
charset.c

index 34a8f02c1d2c5e4fd351ba7e2ed2d04c4f16f61e..b26cf6e3cdd5334b465f07dad8e36d9878a5ff2d 100644 (file)
--- 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);