summaryrefslogtreecommitdiffstats
path: root/charset.h
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2008-08-18 10:20:40 +0200
committerRocco Rutte <pdmef@gmx.net>2008-08-18 10:20:40 +0200
commitc69de21086cd552d88be90cd6e626129168efaa3 (patch)
tree43822820193d08052fab3e86235c60a6e714edf1 /charset.h
parent06ba5e75095170b9d640b704841f905edf463399 (diff)
Validate charset names for all charset options.
Validation is either done against mutt's table of IANA assigned names or local iconv implementation (based on the assumption that iconv_open(charset,charset) fails if charset is unknown to the implementation). Closes #1668.
Diffstat (limited to 'charset.h')
-rw-r--r--charset.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/charset.h b/charset.h
index ab5f062b..bb308868 100644
--- a/charset.h
+++ b/charset.h
@@ -56,4 +56,10 @@ char *mutt_get_default_charset ();
*/
#define M_ICONV_HOOK_FROM 1 /* apply charset-hooks to fromcode */
+/* Check if given character set is valid (either officially assigned or
+ * known to local iconv implementation). If strict is non-zero, check
+ * against iconv only. Returns 0 if known and negative otherwise.
+ */
+int mutt_check_charset (const char *s, int strict);
+
#endif /* _CHARSET_H */