summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e10ea81)
raw | patch | inline | side by side (parent: e10ea81)
author | Jakub Narebski <jnareb@gmail.com> | |
Mon, 8 Dec 2008 13:13:21 +0000 (14:13 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 8 Dec 2008 17:04:36 +0000 (09:04 -0800) |
In insert_file() subroutine (which is used to insert HTML fragments as
custom header, footer, hometext (for projects list view), and per
project README.html (for summary view)) we used:
map(to_utf8, <$fd>);
This doesn't work, and other form has to be used:
map { to_utf8($_) } <$fd>;
Now with test for t9600 added, for $GIT_DIR/README.html.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
custom header, footer, hometext (for projects list view), and per
project README.html (for summary view)) we used:
map(to_utf8, <$fd>);
This doesn't work, and other form has to be used:
map { to_utf8($_) } <$fd>;
Now with test for t9600 added, for $GIT_DIR/README.html.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl | patch | blob | history | |
t/t9500-gitweb-standalone-no-errors.sh | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 951739210a3278802e5ab7eb00bd5d0679deccce..6eb370d8de65556ea5a50af87e91e4508c855953 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
my $filename = shift;
open my $fd, '<', $filename;
- print map(to_utf8, <$fd>);
+ print map { to_utf8($_) } <$fd>;
close $fd;
}
index 64c4cce58b85e7948d5c3a769f437ebfda1daab7..43cd6eecbac70f1ab63f19bf972f17c1f8188d5e 100755 (executable)
gitweb_run "p=.git;a=tree"'
test_debug 'cat gitweb.log'
+# ----------------------------------------------------------------------
+# non-ASCII in README.html
+
+test_expect_success \
+ 'README.html with non-ASCII characters (utf-8)' \
+ 'echo "<b>UTF-8 example:</b><br />" > .git/README.html &&
+ cat "$TEST_DIRECTORY"/t3900/1-UTF-8.txt >> .git/README.html &&
+ gitweb_run "p=.git;a=summary"'
+test_debug 'cat gitweb.log'
+
test_done