Re: More statictics problems...



On Wed, 5 Dec 2001, R.I.P. Deaddog wrote:

> As a side note, is it a possible idea to have META tag added to various
> individual status pages, so that charset for different locales are
> set correctly? Attached a patch again genhtml.pl, but it is untested.

Sorry, the previous patch is obviously wrong, forgot to escape the
double quotes. Here's a corrected one.

Abel
--- /home/maddog/cvs/CVS.GNOME.ORG/gnome-i18n/status/genhtml.pl	Wed Dec  5 02:34:17 2001
+++ ./genhtml.pl	Wed Dec  5 03:06:45 2001
@@ -54,6 +54,26 @@
 
 # used => for readability.
 
+my %charset = (
+    "da" => "iso-8859-1",
+    "de" => "iso-8859-1",
+    "el" => "iso-8859-7",
+    "es" => "iso-8859-1",
+    "fr" => "iso-8859-1",
+    "gl" => "iso-8859-1",
+    "ja" => "euc-jp",
+    "hu" => "iso-8859-2",
+    "nn" => "iso-8859-1",
+    "no" => "iso-8859-1",
+    "pt" => "iso-8859-1",
+    "ro" => "iso-8859-2",
+    "ru" => "koi8-r",
+    "sv" => "iso-8859-1",
+    "tr" => "iso-8859-9",
+    "uk" => "koi8-u",
+    "wa" => "iso-8859-1"
+)
+
 my %modulenames = (
     "da" => "Modul",
     "de" => "Paket",
@@ -490,8 +510,12 @@
     $link = "$details_" . substr($lang, 0, 5) . ".shtml";
     open  TABLE2, ">$htmldir/$link" or die "can't open $htmldir/$link";
     $detail = $details{$lang} || $details{"C"} . $lang;
+    $charset = $charset{$lang} || "US-ASCII";
     print TABLE2 <<"EOF";
-<html><head><title>$detail</title></head><body>
+<html><head>
+<title>$detail</title>
+<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$charset\">
+</head><body>
 <a name=\"$lang\"><b>$detail</b></a><br>
 <table cellpadding=1 cellspacing=1 border=1 >
 EOF


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]