summaryrefslogtreecommitdiffstats
path: root/hdrline.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2003-03-03 14:01:06 +0000
committerThomas Roessler <roessler@does-not-exist.org>2003-03-03 14:01:06 +0000
commitd044f05207a3eea8124b2029c4b04826b9f14003 (patch)
tree096b05db63f07f52223c1215e6531dce5a9e20e8 /hdrline.c
parente8b857a970452e6301b3e937002b623f2684334e (diff)
IDN support for e-mail messages. Things should work automagically
once you have the GNU IDN library available from ftp://alpha.gnu.org/pub/gnu/libidn/ installed. For IDN's which can't be losslessly recoded to your local character set, mutt should automatically fall back to using the ASCII representation. There's probably a considerable number of bugs in this, and the code may, at this point, not even compile on machines without libidn. Will start working on that ASAP.
Diffstat (limited to 'hdrline.c')
-rw-r--r--hdrline.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hdrline.c b/hdrline.c
index 0dd68990..7156ecf9 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -21,6 +21,7 @@
#include "sort.h"
#include "charset.h"
#include "mutt_crypt.h"
+#include "mutt_idna.h"
#include <ctype.h>
#include <stdlib.h>
@@ -261,7 +262,7 @@ hdr_format_str (char *dest,
case 'A':
if(hdr->env->reply_to && hdr->env->reply_to->mailbox)
{
- mutt_format_s (dest, destlen, prefix, hdr->env->reply_to->mailbox);
+ mutt_format_s (dest, destlen, prefix, mutt_addr_for_display (hdr->env->reply_to));
break;
}
/* fall through if 'A' returns nothing */
@@ -269,7 +270,7 @@ hdr_format_str (char *dest,
case 'a':
if(hdr->env->from && hdr->env->from->mailbox)
{
- mutt_format_s (dest, destlen, prefix, hdr->env->from->mailbox);
+ mutt_format_s (dest, destlen, prefix, mutt_addr_for_display (hdr->env->from));
}
else
dest[0] = '\0';
@@ -429,7 +430,7 @@ hdr_format_str (char *dest,
case 'f':
buf2[0] = 0;
- rfc822_write_address (buf2, sizeof (buf2), hdr->env->from);
+ rfc822_write_address (buf2, sizeof (buf2), hdr->env->from, 1);
mutt_format_s (dest, destlen, prefix, buf2);
break;
@@ -593,7 +594,7 @@ hdr_format_str (char *dest,
case 'u':
if (hdr->env->from && hdr->env->from->mailbox)
{
- strfcpy (buf2, hdr->env->from->mailbox, sizeof (buf2));
+ strfcpy (buf2, mutt_addr_for_display (hdr->env->from), sizeof (buf2));
if ((p = strpbrk (buf2, "%@")))
*p = 0;
}