- /*
- * If the text content didn't specify a character
- * set, we need to figure out which one was used.
- */
- t = (struct text *) ct->c_ctparams;
- if (t->tx_charset == CHARSET_UNSPECIFIED) {
- CI ci = &ct->c_ctinfo;
- char **ap, **ep;
-
- for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++)
- continue;
-
- if (contains8bit) {
- *ap = concat ("charset=", write_charset_8bit(), NULL);
- } else {
- *ap = add ("charset=us-ascii", NULL);
- }
- t->tx_charset = CHARSET_SPECIFIED;
-
- cp = strchr(*ap++, '=');
- *ap = NULL;
- *cp++ = '\0';
- *ep = cp;
- }
-