- if (contains8bit) {
- *ap = concat ("charset=", write_charset_8bit(), NULL);
- } else {
- *ap = add ("charset=us-ascii", NULL);
+ 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;