X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/7365bcebe375d78d292a3eeae2ad457216261a17..a1dcc0bd9e1ffd90ef88cd19f8ff8197f541c8a8:/uip/mhbuildsbr.c diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index aefa1f3e..c72bd818 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -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 */