has 8bit characters and set the CTE on the enclosing MIME headers
appropriately.
checklinelen = 0;
checklinespace = 0;
/* don't check anything for message/external */
checklinelen = 0;
checklinespace = 0;
/* don't check anything for message/external */
- if (ct->c_subtype == MESSAGE_EXTERNAL)
+ if (ct->c_subtype == MESSAGE_EXTERNAL) {
+ check8bit = 0;
+ } else {
if (!isascii ((unsigned char) *cp)) {
contains8bit = 1;
check8bit = 0; /* no need to keep checking */
if (!isascii ((unsigned char) *cp)) {
contains8bit = 1;
check8bit = 0; /* no need to keep checking */
- ct->c_encoding = CE_7BIT;
+ ct->c_encoding = contains8bit ? CE_8BIT : CE_7BIT;
- if (ct->c_type == CT_MESSAGE)
- adios (NULL, "internal error, invalid encoding");
-
np = add (ENCODING_FIELD, NULL);
vp = concat (" ", "8bit", "\n", NULL);
add_header (ct, np, vp);
np = add (ENCODING_FIELD, NULL);
vp = concat (" ", "8bit", "\n", NULL);
add_header (ct, np, vp);