{"thread":{"id":"774","subject":"[gitweb PATCH] Configure encoding","startedAt":"2005-05-31T07:55:11Z","lastAt":"2005-05-31T12:21:30Z","messageCount":6,"participants":["Thomas Kolejka","Kay Sievers","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"4290","messageId":"1839.1117526111@www5.gmx.net","threadId":"774","inReplyTo":null,"subject":"[gitweb PATCH] Configure encoding","fromName":"Thomas Kolejka","fromEmail":"thomas.kolejka@gmx.at","sentAt":"2005-05-31T07:55:11Z","receivedAt":"2005-05-31T07:55:11Z","isPatch":true,"sender":{"key":"thomas.kolejka@gmx.at","avatar":null},"body":"The following patch makes it easy to change the encoding:\n\n\n--- gitweb.cgi.177      2005-05-31 09:43:17.000000000 +0200\n+++ gitweb.cgi.p        2005-05-31 09:48:46.000000000 +0200\n@@ -20,6 +20,9 @@\n my $my_uri =           $cgi->url(-absolute => 1);\n my $rss_link = \"\";\n \n+my $encoding = \"utf-8\";\n+$encoding = \"iso-8859-1\";\n+\n # absolute fs-path which will be prepended to the project path\n my $projectroot =      \"/pub/scm\";\n $projectroot = \"pub/scm\";\n@@ -183,9 +186,9 @@\n                        $title .= \"/$action\";\n                }\n        }\n-       print $cgi->header(-type=>'text/html',  -charset => 'utf-8',\n-status=> $status);\n+       print $cgi->header(-type=>'text/html',  -charset => $encoding,\n-status=> $status);\n        print <<EOF;\n-<?xml version=\"1.0\" encoding=\"utf-8\"?>\n+<?xml version=\"1.0\" encoding=\"$encoding\"?>\n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\">\n <!-- git web interface v$version, (C) 2005, Kay Sievers\n<kay.sievers\\@vrfy.org>, Christian Gierke <ch\\@gierke.de> -->\n@@ -1112,8 +1115,8 @@\n        my (@revlist) = map { chomp; $_ } <$fd>;\n        close $fd || die_error(undef, \"Reading rev-list failed.\");\n \n-       print $cgi->header(-type => 'text/xml', -charset => 'utf-8');\n-       print \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\".\n+       print $cgi->header(-type => 'text/xml', -charset => $encoding);\n+       print \"<?xml version=\\\"1.0\\\" encoding=\\\"$encoding\\\"?>\\n\".\n              \"<rss version=\\\"0.91\\\">\\n\";\n        print \"<channel>\\n\";\n        print \"<title>$project</title>\\n\".\n\n\n\nThomas\n\n-- \nWeitersagen: GMX DSL-Flatrates mit Tempo-Garantie!\nAb 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl\n"},{"id":"4292","messageId":"20050531091955.GA22706@vrfy.org","threadId":"774","inReplyTo":"1839.1117526111@www5.gmx.net","subject":"Re: [gitweb PATCH] Configure encoding","fromName":"Kay Sievers","fromEmail":"kay.sievers@vrfy.org","sentAt":"2005-05-31T09:19:55Z","receivedAt":"2005-05-31T09:19:55Z","isPatch":true,"sender":{"key":"kay.sievers@vrfy.org","avatar":null},"body":"On Tue, May 31, 2005 at 09:55:11AM +0200, Thomas Kolejka wrote:\n> The following patch makes it easy to change the encoding:\n> \n> \n> --- gitweb.cgi.177      2005-05-31 09:43:17.000000000 +0200\n> +++ gitweb.cgi.p        2005-05-31 09:48:46.000000000 +0200\n> @@ -20,6 +20,9 @@\n>  my $my_uri =           $cgi->url(-absolute => 1);\n>  my $rss_link = \"\";\n>  \n> +my $encoding = \"utf-8\";\n> +$encoding = \"iso-8859-1\";\n\nThe upstream version will not support anything but the one and only\nsane encoding which is utf-8. It will not provide options to switch\nback to the 80's, sorry. :)\n\nThanks,\nKay\n"},{"id":"4294","messageId":"20050531101217.GA25555@pasky.ji.cz","threadId":"774","inReplyTo":"20050531091955.GA22706@vrfy.org","subject":"Re: [gitweb PATCH] Configure encoding","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-31T10:12:17Z","receivedAt":"2005-05-31T10:12:17Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Tue, May 31, 2005 at 11:19:55AM CEST, I got a letter\nwhere Kay Sievers <kay.sievers@vrfy.org> told me that...\n> On Tue, May 31, 2005 at 09:55:11AM +0200, Thomas Kolejka wrote:\n> > The following patch makes it easy to change the encoding:\n> > \n> > \n> > --- gitweb.cgi.177      2005-05-31 09:43:17.000000000 +0200\n> > +++ gitweb.cgi.p        2005-05-31 09:48:46.000000000 +0200\n> > @@ -20,6 +20,9 @@\n> >  my $my_uri =           $cgi->url(-absolute => 1);\n> >  my $rss_link = \"\";\n> >  \n> > +my $encoding = \"utf-8\";\n> > +$encoding = \"iso-8859-1\";\n> \n> The upstream version will not support anything but the one and only\n> sane encoding which is utf-8. It will not provide options to switch\n> back to the 80's, sorry. :)\n\nThis matters mainly for commits, right?\n\nPerhaps I should recode from current locale to utf8 in cg-commit?\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"4295","messageId":"20050531104425.GA23755@vrfy.org","threadId":"774","inReplyTo":"20050531101217.GA25555@pasky.ji.cz","subject":"Re: [gitweb PATCH] Configure encoding","fromName":"Kay Sievers","fromEmail":"kay.sievers@vrfy.org","sentAt":"2005-05-31T10:44:25Z","receivedAt":"2005-05-31T10:44:25Z","isPatch":true,"sender":{"key":"kay.sievers@vrfy.org","avatar":null},"body":"On Tue, May 31, 2005 at 12:12:17PM +0200, Petr Baudis wrote:\n> Dear diary, on Tue, May 31, 2005 at 11:19:55AM CEST, I got a letter\n> where Kay Sievers <kay.sievers@vrfy.org> told me that...\n> > On Tue, May 31, 2005 at 09:55:11AM +0200, Thomas Kolejka wrote:\n> > > The following patch makes it easy to change the encoding:\n> > > \n> > > \n> > > --- gitweb.cgi.177      2005-05-31 09:43:17.000000000 +0200\n> > > +++ gitweb.cgi.p        2005-05-31 09:48:46.000000000 +0200\n> > > @@ -20,6 +20,9 @@\n> > >  my $my_uri =           $cgi->url(-absolute => 1);\n> > >  my $rss_link = \"\";\n> > >  \n> > > +my $encoding = \"utf-8\";\n> > > +$encoding = \"iso-8859-1\";\n> > \n> > The upstream version will not support anything but the one and only\n> > sane encoding which is utf-8. It will not provide options to switch\n> > back to the 80's, sorry. :)\n> \n> This matters mainly for commits, right?\n\nYes. Also the content of the files, but fortunately they are just plain\nascii most of the time. :)\n\n> Perhaps I should recode from current locale to utf8 in cg-commit?\n\nEverthing else than utf-8 is just a complete mess with data shared\nacross multiple machines. All modern distributions defaulting to utf-8\nanyway, so I think it is sane to recode that utf-8.\n\nKay\n"},{"id":"4296","messageId":"11399.1117537956@www67.gmx.net","threadId":"774","inReplyTo":"20050531104425.GA23755@vrfy.org","subject":"Re: [gitweb PATCH] Configure encoding","fromName":"Thomas Kolejka","fromEmail":"thomas.kolejka@gmx.at","sentAt":"2005-05-31T11:12:36Z","receivedAt":"2005-05-31T11:12:36Z","isPatch":true,"sender":{"key":"thomas.kolejka@gmx.at","avatar":null},"body":"> --- Ursprüngliche Nachricht ---\n> Von: Kay Sievers <kay.sievers@vrfy.org>\n> An: Petr Baudis <pasky@ucw.cz>\n> Kopie: Thomas Kolejka <Thomas.Kolejka@gmx.at>, Git Mailing List\n> <git@vger.kernel.org>\n> Betreff: Re: [gitweb PATCH] Configure encoding\n> Datum: Tue, 31 May 2005 12:44:25 +0200\n> \n> On Tue, May 31, 2005 at 12:12:17PM +0200, Petr Baudis wrote:\n> > Dear diary, on Tue, May 31, 2005 at 11:19:55AM CEST, I got a letter\n> > where Kay Sievers <kay.sievers@vrfy.org> told me that...\n> > > On Tue, May 31, 2005 at 09:55:11AM +0200, Thomas Kolejka wrote:\n> > > > The following patch makes it easy to change the encoding:\n> > > > \n> > > > \n> > > > --- gitweb.cgi.177      2005-05-31 09:43:17.000000000 +0200\n> > > > +++ gitweb.cgi.p        2005-05-31 09:48:46.000000000 +0200\n> > > > @@ -20,6 +20,9 @@\n> > > >  my $my_uri =           $cgi->url(-absolute => 1);\n> > > >  my $rss_link = \"\";\n> > > >  \n> > > > +my $encoding = \"utf-8\";\n> > > > +$encoding = \"iso-8859-1\";\n> > > \n> > > The upstream version will not support anything but the one and only\n> > > sane encoding which is utf-8. It will not provide options to switch\n> > > back to the 80's, sorry. :)\n> > \n> > This matters mainly for commits, right?\n> \n> Yes. Also the content of the files, but fortunately they are just plain\n> ascii most of the time. :)\n\nI've made this changes becausae the german letters like ä, ö, ... are\ndisplayed ugly in the browser.\n\n\n\n> > Perhaps I should recode from current locale to utf8 in cg-commit?\n> \n> Everthing else than utf-8 is just a complete mess with data shared\n> across multiple machines. All modern distributions defaulting to utf-8\n> anyway, so I think it is sane to recode that utf-8.\n> \n> Kay\n> -\n\nThe patch is to _change_ the encoding easy .. or to leave it unchanged.\n\n\nThomas\n\n-- \nGeschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis\n++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++\n"},{"id":"4298","messageId":"20050531122130.GA24395@vrfy.org","threadId":"774","inReplyTo":"11399.1117537956@www67.gmx.net","subject":"Re: [gitweb PATCH] Configure encoding","fromName":"Kay Sievers","fromEmail":"kay.sievers@vrfy.org","sentAt":"2005-05-31T12:21:30Z","receivedAt":"2005-05-31T12:21:30Z","isPatch":true,"sender":{"key":"kay.sievers@vrfy.org","avatar":null},"body":"On Tue, May 31, 2005 at 01:12:36PM +0200, Thomas Kolejka wrote:\n> > --- Ursprüngliche Nachricht ---\n> > Von: Kay Sievers <kay.sievers@vrfy.org>\n> > An: Petr Baudis <pasky@ucw.cz>\n> > Kopie: Thomas Kolejka <Thomas.Kolejka@gmx.at>, Git Mailing List\n> > <git@vger.kernel.org>\n> > Betreff: Re: [gitweb PATCH] Configure encoding\n> > Datum: Tue, 31 May 2005 12:44:25 +0200\n> > \n> > On Tue, May 31, 2005 at 12:12:17PM +0200, Petr Baudis wrote:\n> > > Dear diary, on Tue, May 31, 2005 at 11:19:55AM CEST, I got a letter\n> > > where Kay Sievers <kay.sievers@vrfy.org> told me that...\n> > > > On Tue, May 31, 2005 at 09:55:11AM +0200, Thomas Kolejka wrote:\n> > > > > The following patch makes it easy to change the encoding:\n> > > > > \n> > > > > \n> > > > > --- gitweb.cgi.177      2005-05-31 09:43:17.000000000 +0200\n> > > > > +++ gitweb.cgi.p        2005-05-31 09:48:46.000000000 +0200\n> > > > > @@ -20,6 +20,9 @@\n> > > > >  my $my_uri =           $cgi->url(-absolute => 1);\n> > > > >  my $rss_link = \"\";\n> > > > >  \n> > > > > +my $encoding = \"utf-8\";\n> > > > > +$encoding = \"iso-8859-1\";\n> > > > \n> > > > The upstream version will not support anything but the one and only\n> > > > sane encoding which is utf-8. It will not provide options to switch\n> > > > back to the 80's, sorry. :)\n> > > \n> > > This matters mainly for commits, right?\n> > \n> > Yes. Also the content of the files, but fortunately they are just plain\n> > ascii most of the time. :)\n> \n> I've made this changes becausae the german letters like ä, ö, ... are\n> displayed ugly in the browser.\n\nSo use a sane encoding in your commit-text. We don't store the encoding\nwith the commit, so you don't have any sane other option besides using\nutf-8 if you don't use plain ascii.\n\n> > > Perhaps I should recode from current locale to utf8 in cg-commit?\n> > \n> > Everthing else than utf-8 is just a complete mess with data shared\n> > across multiple machines. All modern distributions defaulting to utf-8\n> > anyway, so I think it is sane to recode that utf-8.\n> \n> The patch is to _change_ the encoding easy .. or to leave it unchanged.\n\nExactly. Change to other encodings is not supported upstream and will\nnot be a configuration value, sorry.\n\nKay\n\n"}]}