git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Kolejka" <Thomas.Kolejka@gmx.at>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: [gitweb PATCH] Configure encoding
Date: Tue, 31 May 2005 09:55:11 +0200 (MEST)	[thread overview]
Message-ID: <1839.1117526111@www5.gmx.net> (raw)

The following patch makes it easy to change the encoding:


--- gitweb.cgi.177      2005-05-31 09:43:17.000000000 +0200
+++ gitweb.cgi.p        2005-05-31 09:48:46.000000000 +0200
@@ -20,6 +20,9 @@
 my $my_uri =           $cgi->url(-absolute => 1);
 my $rss_link = "";
 
+my $encoding = "utf-8";
+$encoding = "iso-8859-1";
+
 # absolute fs-path which will be prepended to the project path
 my $projectroot =      "/pub/scm";
 $projectroot = "pub/scm";
@@ -183,9 +186,9 @@
                        $title .= "/$action";
                }
        }
-       print $cgi->header(-type=>'text/html',  -charset => 'utf-8',
-status=> $status);
+       print $cgi->header(-type=>'text/html',  -charset => $encoding,
-status=> $status);
        print <<EOF;
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="$encoding"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
 <!-- git web interface v$version, (C) 2005, Kay Sievers
<kay.sievers\@vrfy.org>, Christian Gierke <ch\@gierke.de> -->
@@ -1112,8 +1115,8 @@
        my (@revlist) = map { chomp; $_ } <$fd>;
        close $fd || die_error(undef, "Reading rev-list failed.");
 
-       print $cgi->header(-type => 'text/xml', -charset => 'utf-8');
-       print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".
+       print $cgi->header(-type => 'text/xml', -charset => $encoding);
+       print "<?xml version=\"1.0\" encoding=\"$encoding\"?>\n".
              "<rss version=\"0.91\">\n";
        print "<channel>\n";
        print "<title>$project</title>\n".



Thomas

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

             reply	other threads:[~2005-05-31  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-31  7:55 Thomas Kolejka [this message]
2005-05-31  9:19 ` [gitweb PATCH] Configure encoding Kay Sievers
2005-05-31 10:12   ` Petr Baudis
2005-05-31 10:44     ` Kay Sievers
2005-05-31 11:12       ` Thomas Kolejka
2005-05-31 12:21         ` Kay Sievers

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1839.1117526111@www5.gmx.net \
    --to=thomas.kolejka@gmx.at \
    --cc=git@vger.kernel.org \
    --cc=kay.sievers@vrfy.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.
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 NNTP newsgroup(s).