aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
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/mail-format.c
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/mail-format.c')
-rw-r--r--mail/mail-format.c19
1 files changed, 8 insertions, 11 deletions
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);
}