about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Bastien-Filiatrault <joe@x2a.org>2007-10-26 18:13:41 -0400
committerJonathan Bastien-Filiatrault <joe@x2a.org>2007-11-05 18:13:31 -0500
commit7858a309d7671109950ec940f893c2d112d36b99 (patch)
tree676723bafc103e232341aa05be4d57ed773b9feb
parentAdd iconv_msg function. (diff)
downloadcgit-pink-7858a309d7671109950ec940f893c2d112d36b99.tar.gz
cgit-pink-7858a309d7671109950ec940f893c2d112d36b99.zip
Convert subject and message with iconv_msg.
-rw-r--r--parsing.c14
1 files changed, 14 insertions, 0 deletions
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;
 }
 
7-05-13Add max-commit-count parameter to cgitrcLars Hjemli 2007-05-13Show number of changed lines in log viewLars Hjemli 2007-05-13Simplify ui-diff.c using the new file-level diff interfaceLars Hjemli 2007-05-13Add standard interface for file diff functionsLars Hjemli 2007-05-13Show number of changed files in log viewLars Hjemli 2007-05-13Use standard tree-diff function when showing diffstat for single commitLars Hjemli 2007-05-13Add shared diff-handling functionsLars Hjemli 2007-05-12css: fix bad rendering in Internet ExplorerLars Hjemli 2007-05-11Add links to enable downloading of tagged blobsLars Hjemli 2007-05-11Makefile: add support for building w.o. preinstalled gitLars Hjemli 2007-05-11Tag release v0.3Lars Hjemli 2007-05-11Update README with submodule build infoLars Hjemli 2007-05-11Add submodule links in tree listingLars Hjemli 2007-05-11Add submodules.sh and use it during buildsLars Hjemli 2007-05-11Added git as a submoduleLars Hjemli 2007-05-09Add support for downloading single blobsLars Hjemli 2007-05-08ui-view: show pathname if specified in querystringLars Hjemli 2007-05-08Update to libgit 1.5.2-rc2Lars Hjemli 2007-02-21Layout updateLars Hjemli 2007-02-08Make snapshot feature configurableLars Hjemli 2007-02-08Add support for snapshotsLars Hjemli 2007-02-05cgit v0.2Lars Hjemli 2007-02-05Add support for prefix and gitsrc arguments to 'make'Lars Hjemli 2007-02-04Update cgitrc templateLars Hjemli 2007-02-04Add support for lightweight tagsLars Hjemli 2007-02-04Read repo-info from /etc/cgitrcLars Hjemli 2007-02-04Do not die if tag has no messageLars Hjemli 2007-02-03Fix search for non-virtual urlsLars Hjemli 2007-01-28Update README with install/config informationLars Hjemli