summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-03-09 14:01:40 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-03-09 14:01:40 -0400
commit7bd0d536442493a8898981a8a784bf16126085c5 (patch)
tree0bfed9f3b2111cee3d67eef18cdaa053c375f3c3 /IkiWiki
parent793e9332c3fc6db6733dce6783d6ac9c8058bb8d (diff)
git: Fix utf-8 encoding of author names.
I guess what's happening here is that since the name is passed to git via an environment variable, perl's normal utf-8 IO layer stuff doesn't work. So we have to explicitly decode the string from perl's internal representation into utf-8.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/git.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index 042c69f5a..12f3a74cb 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -447,7 +447,7 @@ sub rcs_commit_staged ($$$) {
# Set the commit author and email to the web committer.
my %env=%ENV;
if (defined $user || defined $ipaddr) {
- my $u=defined $user ? $user : $ipaddr;
+ my $u=encode_utf8(defined $user ? $user : $ipaddr);
$ENV{GIT_AUTHOR_NAME}=$u;
$ENV{GIT_AUTHOR_EMAIL}="$u\@web";
}