ソースを参照

maddr: 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年前
コミット
4f1f0ea2b3
  1. 12
      maddr.c

12
maddr.c

@ -57,12 +57,14 @@ addr(char *file)
v = blaze822_chdr(msg, h);
if (v) {
char *disp, *addr;
char vdec[16384];
blaze822_decode_rfc2047(vdec, v, sizeof vdec - 1, "UTF-8");
vdec[sizeof vdec - 1] = 0;
v = vdec;
char ddec[16384];
while ((v = blaze822_addr(v, &disp, &addr))) {
if (disp) {
blaze822_decode_rfc2047(ddec, disp, sizeof ddec - 1, "UTF-8");
ddec[sizeof ddec - 1] = 0;
disp = ddec;
}
if (disp && addr && strcmp(disp, addr) == 0)
disp = 0;

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