From: Jonathan Bastien-Filiatrault Date: Fri, 26 Oct 2007 22:13:41 +0000 (-0400) Subject: Convert subject and message with iconv_msg. X-Git-Tag: v0.8~109^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7858a309d7671109950ec940f893c2d112d36b99;p=cgit Convert subject and message with iconv_msg. --- diff --git a/parsing.c b/parsing.c index f156c12..c731084 100644 --- a/parsing.c +++ b/parsing.c @@ -320,6 +320,20 @@ struct commitinfo *cgit_parse_commit(struct commit *commit) } 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; }