ソースを参照

mhdr: print_addresses: decode only display part of address

RFC 2047.6.2:
   NOTE: Decoding and display of encoded-words occurs *after* a
   structured field body is parsed into tokens.
pull/211/head
Leah Neukirchen 1年前
コミット
0ed7f72d31
  1. 14
      mhdr.c

14
mhdr.c

@ -87,19 +87,19 @@ void
print_addresses(char *s)
{
char *disp, *addr;
char sdec[4096];
if (dflag) {
blaze822_decode_rfc2047(sdec, s, sizeof sdec, "UTF-8");
sdec[sizeof sdec - 1] = 0;
s = sdec;
}
char ddec[4096];
while ((s = blaze822_addr(s, &disp, &addr))) {
if (Hflag && addr)
printf("%s\t", curfile);
if (disp && addr) {
if (dflag) {
blaze822_decode_rfc2047(ddec, disp, sizeof ddec, "UTF-8");
ddec[sizeof ddec - 1] = 0;
disp = ddec;
}
print_quoted(disp);
printf(" <%s>\n", addr);
} else if (addr) {

読み込み中…
キャンセル
保存