# Re: [PATCH] gitweb: Fix the author initials in blame for non-ASCII names

2 messages from 2014-03-17 to 2014-03-17. Participants: Kicer Jiao.
Thread: https://gitlist.dev/t/36194

## Kicer Jiao, 2014-03-17 09:21

Subject: Re: [PATCH] gitweb: Fix the author initials in blame for non-ASCII names
Message-ID: <CAGRPCXzJXfKtB1wkOMN_7dQ6RdXAs5YNQ+p70eoUYOr5zXkM_w@mail.gmail.com>
URL: https://gitlist.dev/e/CAGRPCXzJXfKtB1wkOMN_7dQ6RdXAs5YNQ%2Bp70eoUYOr5zXkM_w%40mail.gmail.com

```
Dear all,

I have a git-project which source code use gbk encoding. When use
gitweb blame view, it will report an error then stop parse:
>    Malformed UTF-8 character (fatal) at /usr/share/gitweb/gitweb.cgi line 1595, &lt;$fd&gt; line 45.

After apply this patch, blame view of gbk source file will back to normally.
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 79057b7..e6fdcfe 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6704,7 +6704,6 @@ sub git_blame_common {
                        $hash_base, '--', $file_name
                        or die_error(500, "Open git-blame --porcelain failed");
        }
-       binmode $fd, ':utf8';

        # incremental blame data returns early
        if ($format eq 'data') {

When I search the git.git log, this commit add the "binmode ..." line,
maybe should recheck this commit? Thanks.
fd87004e51df835e5833bfe1bff3ad0137d42227  "gitweb: Fix the author
initials in blame for non-ASCII names"


BR,
2014-03-17

```

## Kicer Jiao, 2014-03-17 09:34

Subject: Re: [PATCH] gitweb: Fix the author initials in blame for non-ASCII names
Message-ID: <CAGRPCXyf_QtHm3g2DY9Q3+9qrHegbE+nXoR=YAw_YcQvS+kCRg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGRPCXyf_QtHm3g2DY9Q3%2B9qrHegbE%2BnXoR%3DYAw_YcQvS%2BkCRg%40mail.gmail.com
In-Reply-To: <CAGRPCXzJXfKtB1wkOMN_7dQ6RdXAs5YNQ+p70eoUYOr5zXkM_w@mail.gmail.com>

```
Dear all,

I have a git-project which source code use gbk encoding. When use
gitweb blame view, it will report an error then stop parse:
>    Malformed UTF-8 character (fatal) at /usr/share/gitweb/gitweb.cgi line 1595, &lt;$fd&gt; line 45.

After apply this patch, blame view of gbk source file will back to normally.
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 79057b7..e6fdcfe 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6704,7 +6704,6 @@ sub git_blame_common {
                        $hash_base, '--', $file_name
                        or die_error(500, "Open git-blame --porcelain failed");
        }
-       binmode $fd, ':utf8';

        # incremental blame data returns early
        if ($format eq 'data') {

When I search the git.git log, this commit add the "binmode ..." line,
maybe should recheck this commit? Thanks.
fd87004e51df835e5833bfe1bff3ad0137d42227  "gitweb: Fix the author
initials in blame for non-ASCII names"


BR,
2014-03-17

```
