diff options
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-format.c | 19 |
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); } |