From 8c7e822d888b48db883ea9a1f6849d27b799a4f0 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 15 Jul 2016 16:51:43 +0200 Subject: [PATCH] hdr: rfc2047 decode headers --- Makefile | 2 +- hdr.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0768d70..cfed8a3 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ all: $(ALL) scan: blaze822.o scan.o rfc2047.o thread: blaze822.o thread.o -hdr: blaze822.o hdr.o +hdr: blaze822.o hdr.o rfc2047.o show: blaze822.o show.o list: list.o next: next.o diff --git a/hdr.c b/hdr.c index bc59f75..6dd96ca 100644 --- a/hdr.c +++ b/hdr.c @@ -54,8 +54,12 @@ headerall(char *file) return; char *h = 0; - while ((h = blaze822_next_header(msg, h))) - printhdr(h); + while ((h = blaze822_next_header(msg, h))) { + char d[4096]; + blaze822_decode_rfc2047(d, h, sizeof d, "UTF-8"); + + printhdr(d); + } } int