]> diplodocus.org Git - nmh/blobdiff - uip/mhbuildsbr.c
Put, rather than print, single characters.
[nmh] / uip / mhbuildsbr.c
index aefa1f3e27fcc5eab2c95bcc7fb55817a1e3347a..c72bd8185a8a6ee01a0c3dc18965ba58d23d481c 100644 (file)
@@ -560,6 +560,13 @@ finish_field:
     if ((cp = strchr(prefix, 'a')) == NULL)
        adios (NULL, "internal error(4)");
 
+    /*
+     * If using EAI, force 8-bit charset.
+     */
+    if (header_encoding == CE_8BIT) {
+        set_charset (ct, 1);
+    }
+
     /*
      * Scan the contents.  Choose a transfer encoding, and
      * check if prefix for multipart boundary clashes with
@@ -1779,7 +1786,12 @@ skip_headers:
 
     /*
      * output the Content-Transfer-Encoding
+     * If using EAI and message body is 7-bit, force 8-bit C-T-E.
      */
+    if (header_encoding == CE_8BIT  &&  ct->c_encoding == CE_7BIT) {
+        ct->c_encoding = CE_8BIT;
+    }
+
     switch (ct->c_encoding) {
     case CE_7BIT:
        /* Nothing to output */