X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=mailinfo.c;h=3c56f8c10801bdc93eaaac6319e477f81c096717;hb=42277bc81ce2f4450fe08239e4db34516f879c1d;hp=0265a29a3855902e25e44099663c2973bbe9f53e;hpb=2414721b194453f058079d897d13c4e377f92dc6;p=git.git diff --git a/mailinfo.c b/mailinfo.c index 0265a29a..3c56f8c1 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -7,7 +7,9 @@ #include #include #include +#ifndef NO_ICONV #include +#endif #include "git-compat-util.h" #include "cache.h" @@ -469,6 +471,7 @@ static int decode_b_segment(char *in, char *ot, char *ep) static void convert_to_utf8(char *line, char *charset) { +#ifndef NO_ICONV char *in, *out; size_t insize, outsize, nrc; char outbuf[4096]; /* cheat */ @@ -501,6 +504,7 @@ static void convert_to_utf8(char *line, char *charset) return; *out = 0; strcpy(line, outbuf); +#endif } static void decode_header_bq(char *it) @@ -707,6 +711,9 @@ static void handle_multipart_body(void) if (!len) { if (handle_multipart_one_part() < 0) return; + /* Reset per part headers */ + transfer_encoding = TE_DONTCARE; + charset[0] = 0; } else check_subheader_line(line, len);