all repos — cgit @ 7858a309d7671109950ec940f893c2d112d36b99

a hyperfast web frontend for git written in c

Convert subject and message with iconv_msg.
Jonathan Bastien-Filiatrault joe@x2a.org
Fri, 26 Oct 2007 18:13:41 -0400
commit

7858a309d7671109950ec940f893c2d112d36b99

parent

af0819830445e39584a0137034562086a55deaf2

1 files changed, 14 insertions(+), 0 deletions(-)

jump to
M parsing.cparsing.c

@@ -320,6 +320,20 @@ ret->msg = xstrdup(p);

} else ret->subject = substr(p, p+strlen(p)); + if(strcmp(ret->msg_encoding, PAGE_ENCODING)) { + t = iconv_msg(ret->subject, ret->msg_encoding); + if(t) { + free(ret->subject); + ret->subject = t; + } + + t = iconv_msg(ret->msg, ret->msg_encoding); + if(t) { + free(ret->msg); + ret->msg = t; + } + } + return ret; }