From 2c194837766ea2c43963080f67968fcd21d87137 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 11 Jun 2003 15:59:30 +0000 Subject: Add the CAMEL_BESTENC_TEXT bit to enctype if the part is a text part. 2003-06-09 Jeffrey Stedfast * camel-mime-message.c (find_best_encoding): Add the CAMEL_BESTENC_TEXT bit to enctype if the part is a text part. * camel-mime-filter-bestenc.c (camel_mime_filter_bestenc_get_best_encoding): If we have any nul-bytes or if the content is non-text and contains any 8bit octets, we need to use base64. Fixes bug #44344. svn path=/trunk/; revision=21409 --- camel/camel-mime-filter-bestenc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'camel/camel-mime-filter-bestenc.h') diff --git a/camel/camel-mime-filter-bestenc.h b/camel/camel-mime-filter-bestenc.h index 3d2e79fa55..de4a82d502 100644 --- a/camel/camel-mime-filter-bestenc.h +++ b/camel/camel-mime-filter-bestenc.h @@ -52,6 +52,9 @@ enum _CamelBestencEncoding { CAMEL_BESTENC_7BIT, CAMEL_BESTENC_8BIT, CAMEL_BESTENC_BINARY, + + /* is the content stream to be treated as text? */ + CAMEL_BESTENC_TEXT = 1<<8, }; typedef enum _CamelBestencEncoding CamelBestencEncoding; @@ -70,7 +73,7 @@ struct _CamelMimeFilterBestenc { int startofline; /* are we at the start of a new line? */ int fromcount; - char fromsave[6]; /* save a few characters if we found an \nF near the end of the buffer */ + char fromsave[6]; /* save a few characters if we found an \n near the end of the buffer */ int hadfrom; /* did we encounter a "\nFrom " in the data? */ unsigned int countline; /* current count of characters on a given line */ -- cgit v1.2.3