Patch: do not convert all text parts to UTF-8
- From: Thomas Monjalon <thomas monjalon openwide fr>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Patch: do not convert all text parts to UTF-8
- Date: Fri, 8 Aug 2008 16:13:31 +0200
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:
http://www.iana.org/assignments/media-types/text
I think it's better to convert only text/plain parts.
--
Thomas
--- 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);
else
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);
else
bytes = camel_data_wrapper_decode_to_stream (wrapper, stream);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]