Patch: do not convert all text parts to UTF-8

Hi all,

Tinymail converts all text parts to UTF-8.
But some texts could be altered if they are converted.
For example, an HTML document has its own defined charset. If we convert the 
document without modify its charset definition, it will be bad displayed.

Here are the standards text/* mime types:

I think it's better to convert only text/plain parts.
--- libtinymail-camel/tny-camel-mime-part.c
+++ libtinymail-camel/tny-camel-mime-part.c
@@ -781,7 +781,7 @@ tny_camel_mime_part_decode_to_stream_def
 		return -1;
-	if (camel_content_type_is (wrapper->mime_type, "text", "*"))
+	if (camel_content_type_is (wrapper->mime_type, "text", "plain"))
 		bytes = (gssize) camel_stream_format_text (wrapper, cstream);
 		bytes = (gssize) camel_data_wrapper_decode_to_stream (wrapper, cstream);
@@ -945,7 +945,7 @@ tny_camel_mime_part_get_decoded_stream_d
 	if (wrapper->stream) {
 		camel_stream_reset (wrapper->stream);
-		if (camel_content_type_is (wrapper->mime_type, "text", "*"))
+		if (camel_content_type_is (wrapper->mime_type, "text", "plain"))
 			bytes = camel_stream_format_text (wrapper, stream);
 			bytes = camel_data_wrapper_decode_to_stream (wrapper, stream);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]