git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Next: Jakub Narebski
Message 1 of 3 in “gitweb: open files (e.g. indextext.html) in utf8 mode”
  1. gitweb: open files (e.g. indextext.html) in utf8 modeGerrit Pape, Jul 2, 2008
  2. Jakub NarebskiJul 2, 2008
  3. Lea WiemannJul 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.