From: Tatsuki Sugiura <sugi@nemui.org>
To: git@vger.kernel.org
Subject: [PATCH] gitweb: fix encode handling for site_{header,footer}
Date: Mon, 17 Nov 2008 16:53:07 +0900 [thread overview]
Message-ID: <87vdumbxgc.wl@vaj-k-334-sugi.local.valinux.co.jp> (raw)
All non-ASCII chars of site_{header,footer} will be broken
by perl IO layer without decoding to utf8.
Here is a fix to just call to_utf8 for inputs from these files.
Signed-off-by: Tatsuki Sugiura <sugi@nemui.org>
---
gitweb/gitweb.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 933e137..79ca5c2 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2929,7 +2929,7 @@ EOF
if (-f $site_header) {
open (my $fd, $site_header);
- print <$fd>;
+ print map {to_utf8($_)} <$fd>;
close $fd;
}
@@ -3018,7 +3018,7 @@ sub git_footer_html {
if (-f $site_footer) {
open (my $fd, $site_footer);
- print <$fd>;
+ print map {to_utf8($_)} <$fd>;
close $fd;
}
--
1.5.6.5
next reply other threads:[~2008-11-17 8:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 7:53 Tatsuki Sugiura [this message]
2008-11-17 10:28 ` [PATCH] gitweb: fix encode handling for site_{header,footer} Junio C Hamano
2008-11-17 10:40 ` Jakub Narebski
2008-12-01 18:01 ` [PATCH] gitweb: Fix handling of non-ASCII characters in inserted HTML files Jakub Narebski
2008-12-03 3:55 ` Junio C Hamano
2008-12-03 10:21 ` Jakub Narebski
2008-12-03 21:14 ` Junio C Hamano
2008-12-08 13:13 ` [PATCH] gitweb: Fix bug in insert_file() subroutine Jakub Narebski
2008-12-08 17:05 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vdumbxgc.wl@vaj-k-334-sugi.local.valinux.co.jp \
--to=sugi@nemui.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).