]> sipb.mit.edu Git - ikiwiki.git/commitdiff
git: Fix utf-8 encoding of author names.
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 9 Mar 2009 18:01:40 +0000 (14:01 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 9 Mar 2009 18:01:40 +0000 (14:01 -0400)
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.

IkiWiki/Plugin/git.pm
debian/changelog

index 042c69f5a043699ff275f4acb7433a9482a366c8..12f3a74cb7a11178b29fae3300f9e84db76c07b7 100644 (file)
@@ -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";
        }
index c66db85a2ca51d839543db99c40b17bae5c7ecce..a7e7544c6cf0a68af1cf2e603bbc0753a1c36204 100644 (file)
@@ -1,3 +1,9 @@
+ikiwiki (3.08) UNRELEASED; urgency=low
+
+  * git: Fix utf-8 encoding of author names.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 09 Mar 2009 14:00:21 -0400
+
 ikiwiki (3.07) unstable; urgency=low
  
   * Updated German translation (Kai Wasserbäch). Closes: #518377