aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-01-12 03:47:06 +0800
committerDan Winship <danw@src.gnome.org>2001-01-12 03:47:06 +0800
commit4f87c4df057b42ed5ab40012b0ab9d89b4ece96d (patch)
tree6bdc1861abe30bd5c068736188de2da55ff80df7 /mail
parente39675d2fb02592d4e2dd651b549ea5493e56c13 (diff)
downloadgsoc2013-evolution-4f87c4df057b42ed5ab40012b0ab9d89b4ece96d.tar
gsoc2013-evolution-4f87c4df057b42ed5ab40012b0ab9d89b4ece96d.tar.gz
gsoc2013-evolution-4f87c4df057b42ed5ab40012b0ab9d89b4ece96d.tar.bz2
gsoc2013-evolution-4f87c4df057b42ed5ab40012b0ab9d89b4ece96d.tar.lz
gsoc2013-evolution-4f87c4df057b42ed5ab40012b0ab9d89b4ece96d.tar.xz
gsoc2013-evolution-4f87c4df057b42ed5ab40012b0ab9d89b4ece96d.tar.zst
gsoc2013-evolution-4f87c4df057b42ed5ab40012b0ab9d89b4ece96d.zip
Translate the header name to UTF8.
* mail-format.c (write_field_to_stream): Translate the header name to UTF8. svn path=/trunk/; revision=7403
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-format.c19
2 files changed, 13 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1fa988b000..64b0dc99e6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2001-01-11 Dan Winship <danw@ximian.com>
+
+ * mail-format.c (write_field_to_stream): Translate the header name
+ to UTF8.
+
2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
* mail-callbacks.c (configure_mail): New function that explains to
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 2358c4c352..07b49ffb0a 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -573,25 +573,22 @@ enum {
static void
write_field_to_stream(const char *description, const char *value, int flags, GtkHTML *html, GtkHTMLStream *stream)
{
- char *encoded_value;
+ char *encoded_desc, *encoded_value;
int bold = (flags&WRITE_BOLD) == WRITE_BOLD;
- if (value) {
+ /* The description comes from gettext... */
+ encoded_desc = e_utf8_from_gtk_string (GTK_WIDGET (html), description);
+
+ if (value)
encoded_value = e_text_to_html (value, E_TEXT_TO_HTML_CONVERT_NL|E_TEXT_TO_HTML_CONVERT_URLS);
-#if 0 /* I dont think this needs to be here anymore ... e_text_to_html should handle that anyway */
- char *p;
- for (p = encoded_value; *p; p++) {
- if (!isprint (*p))
- *p = '?';
- }
-#endif
- } else
+ else
encoded_value = "";
mail_html_write(html, stream,
"<tr valign=top><%s align=right>%s</%s>"
"<td>%s</td></tr>", bold ? "th" : "td",
- description, bold ? "th" : "td", encoded_value);
+ encoded_desc, bold ? "th" : "td", encoded_value);
+ g_free (encoded_desc);
if (value)
g_free(encoded_value);
}