diff options
author | Jonathan Bastien-Filiatrault <joe@x2a.org> | 2007-10-27 00:13:41 +0200 |
---|---|---|
committer | Jonathan Bastien-Filiatrault <joe@x2a.org> | 2007-11-06 00:13:31 +0100 |
commit | 7858a309d7671109950ec940f893c2d112d36b99 (patch) | |
tree | 676723bafc103e232341aa05be4d57ed773b9feb | |
parent | af0819830445e39584a0137034562086a55deaf2 (diff) | |
download | cgit-7858a309d7671109950ec940f893c2d112d36b99.tar.gz cgit-7858a309d7671109950ec940f893c2d112d36b99.tar.xz |
Convert subject and message with iconv_msg.
-rw-r--r-- | parsing.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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; } |