[PATCH/rfc] gitweb: open files (e.g. indextext.html) in utf8 mode
- From
Gerrit Pape <pape@smarden.org>
- Date
- Jul 2, 2008, 12:13 UTC
- Message-ID
- <20080702121317.10819.qmail@bca5b84cb0e0a0.315fe32.mid.smarden.org>
From: =?utf-8?q?Recai=20Okta=C5=9F?= <roktas@debian.org>
gitweb used to use utf8 only in stdout. As a result, included files like indextext.html appeared garbled if they contain utf8 characters. Now utf8 is also used when reading files.
The patch was submitted through http://bugs.debian.org/487465
Signed-off-by: Gerrit Pape <pape@smarden.org> --- gitweb/gitweb.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 90cd99b..96cb4e0 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -16,7 +16,7 @@ use Encode; use Fcntl ':mode'; use File::Find qw(); use File::Basename qw(basename); -binmode STDOUT, ':utf8'; +use open qw(:std :utf8); BEGIN { CGI->compile() if $ENV{'MOD_PERL'};
-- 1.5.6