From 7858a309d7671109950ec940f893c2d112d36b99 Mon Sep 17 00:00:00 2001 From: Jonathan Bastien-Filiatrault Date: Fri, 26 Oct 2007 18:13:41 -0400 Subject: Convert subject and message with iconv_msg. --- parsing.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'parsing.c') 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; } -- cgit v1.2.3-70-g09d2