aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorYasushi SHOJI <yashi@atmark-techno.com>2007-01-30 19:23:38 +0900
committerJunio C Hamano <junkio@cox.net>2007-02-05 13:49:00 -0800
commit041794188ff4f7a0b3ada8058d174a0c114da78b (patch)
tree48f60481d095db8dd44ee4ed21e247eed9e9bc80 /gitweb
parentb2e69f6299b5a46840600176679b94843cf63a8d (diff)
downloadgit-041794188ff4f7a0b3ada8058d174a0c114da78b.tar.gz
git-041794188ff4f7a0b3ada8058d174a0c114da78b.tar.xz
gitweb: Convert project name to UTF-8
If the repository directory name is in non-ascii, $project needs to be converted from perl internal to utf-8 because it will be used as title, page path, and snapshot filename. use to_utf8() to do the conversion. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a2076a680..d37411007 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1690,7 +1690,7 @@ sub git_header_html {
my $title = "$site_name";
if (defined $project) {
- $title .= " - $project";
+ $title .= " - " . to_utf8($project);
if (defined $action) {
$title .= "/$action";
if (defined $file_name) {
@@ -1963,7 +1963,7 @@ sub git_print_page_path {
print "<div class=\"page_path\">";
print $cgi->a({-href => href(action=>"tree", hash_base=>$hb),
- -title => 'tree root'}, "[$project]");
+ -title => 'tree root'}, to_utf8("[$project]");
print " / ";
if (defined $name) {
my @dirname = split '/', $name;
@@ -3610,7 +3610,7 @@ sub git_snapshot {
$hash = git_get_head_hash($project);
}
- my $filename = basename($project) . "-$hash.tar.$suffix";
+ my $filename = to_utf8(basename($project)) . "-$hash.tar.$suffix";
print $cgi->header(
-type => "application/$ctype",