+/* XXX: This could be made far better and check for other attributes
+ * and stuff, but not now. */
+static const char *ckctype(const char *ctype)
+{
+ if(!strncmp(ctype, "text/", 5) && (strchr(ctype, ';') == NULL))
+ return(sprintf2("%s; charset=%s", ctype, nl_langinfo(CODESET)));
+ return(ctype);
+}
+