1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
Author: Ludovic Rousseau <rousseau@debian.org>
Last-Update: 2013-09-02
Bug-Debian: https://bugs.debian.org/720841
Description: Use UTF-8 instead of the default ISO-8859-1
--- a/drraw.cgi
+++ b/drraw.cgi
@@ -647,7 +647,7 @@ if ( scalar(@pnames) == 0 || defined(par
# The graph/template browser pages, by default.
#
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '. $title),
$header,
h1({-class=>'title'}, a({-href=>&MakeURL}, $title));
@@ -808,7 +808,7 @@ if ( scalar(@pnames) == 0 || defined(par
&TMPLFind($TemplatesById{param('Template')}{'Filter'},
$TemplatesById{param('Template')}{'Display'});
print
- header,
+ header(-charset=>'UTF-8'),
start_html({-style=>{-code=>$CSS}, -title=>'drraw - '
. $TemplatesById{param('Template')}{'Name'}}),
$header,
@@ -828,7 +828,7 @@ if ( scalar(@pnames) == 0 || defined(par
} elsif ( defined(param('Dashboard'))
&& !defined($BoardsById{param('Dashboard')}) ) {
print
- header,
+ header(-charset=>'UTF-8'),
start_html({-style=>{-code=>$CSS}, -title=>'drraw - '. $title}),
$header,
h1('Invalid Request.'),
@@ -841,7 +841,7 @@ if ( scalar(@pnames) == 0 || defined(par
&BoardFind(param('Dashboard'));
if ( scalar(keys(%DBTMPL)) > 0 && !defined(param('Base')) ) {
print
- header,
+ header(-charset=>'UTF-8'),
start_html({-style=>{-code=>$CSS}, -title=>'drraw - '
. $BoardsById{param('Dashboard')}{'Name'}}),
$header,
@@ -932,7 +932,7 @@ if ( scalar(@pnames) == 0 || defined(par
# Header
print
- header,
+ header(-charset=>'UTF-8'),
start_html({-style=>{-code=>$CSS}, -title=>'drraw - '
. $BoardsById{$board}{'Name'},
-head=>meta({-http_equiv=>'Refresh',
@@ -1217,7 +1217,7 @@ if ( scalar(@pnames) == 0 || defined(par
# Graph/template display page
#
print
- header;
+ header(-charset=>'UTF-8');
my $id;
if ( defined(param('Graph')) ) {
# Graph header
@@ -1578,7 +1578,7 @@ if ( scalar(@pnames) == 0 || defined(par
|| ( $level == 1
&& $user ne $BoardsById{$1}{'Owner'} ) ) {
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS},
-title=>'drraw - '. $title),
$header,
@@ -1587,7 +1587,7 @@ if ( scalar(@pnames) == 0 || defined(par
} else {
unlink "${saved_dir}/d" . $1; # Untaint
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '.$title,
-head=>meta({-http_equiv=>'refresh',
-content=>'1;URL=' .
@@ -1600,7 +1600,7 @@ if ( scalar(@pnames) == 0 || defined(par
}
} else {
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '. $title),
$header,
h1({-class=>'title'}, a({-href=>&MakeURL}, $title)),
@@ -1608,7 +1608,7 @@ if ( scalar(@pnames) == 0 || defined(par
}
} else {
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '. $title),
$header,
h1({-class=>'title'}, a({-href=>&MakeURL}, $title));
@@ -1745,7 +1745,7 @@ if ( scalar(@pnames) == 0 || defined(par
|| ( $level == 1
&& $user ne $GraphsById{$1}{'Owner'} ) ) {
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS},
-title=>'drraw - '. $title),
$header,
@@ -1754,7 +1754,7 @@ if ( scalar(@pnames) == 0 || defined(par
} else {
unlink "${saved_dir}/g" . $1; # Untaint
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '.$title,
-head=>meta({-http_equiv=>'refresh',
-content=>'1;URL=' .
@@ -1771,7 +1771,7 @@ if ( scalar(@pnames) == 0 || defined(par
|| ( $level == 1
&& $user ne $TemplatesById{$1}{'Owner'} ) ){
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS},
-title=>'drraw - '. $title),
$header,
@@ -1780,7 +1780,7 @@ if ( scalar(@pnames) == 0 || defined(par
} else {
unlink "${saved_dir}/t" . $1;
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '.$title,
-head=>meta({-http_equiv=>'refresh',
-content=>'1;URL=' .
@@ -1793,7 +1793,7 @@ if ( scalar(@pnames) == 0 || defined(par
}
} else {
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '. $title),
$header,
h1({-class=>'title'}, a({-href=>&MakeURL}, $title)),
@@ -1801,7 +1801,7 @@ if ( scalar(@pnames) == 0 || defined(par
}
} else {
print
- header,
+ header(-charset=>'UTF-8'),
start_html(-style=>{-code=>$CSS}, -title=>'drraw - '. $title),
$header,
h1({-class=>'title'}, a({-href=>&MakeURL}, $title));
@@ -3825,6 +3825,7 @@ sub DRAW
} else {
$out = '-';
print header(-type=>$Mime{param('gFormat')},
+ -charset=>'UTF-8',
-expires=>'+'. $ttl .'s',
-last_modified=>&time2str());
}
@@ -3872,11 +3873,13 @@ sub DRAW
if ( !defined($ENV{'HTTP_IF_MODIFIED_SINCE'})
|| $ENV{'HTTP_IF_MODIFIED_SINCE'} ne $lm ) {
print header(-type=>$Mime{param('gFormat')},
+ -charset=>'UTF-8',
-expires=>&time2str($out), -last_modified=>$lm);
while (<IMG>) { print; };
} else {
# Apache would do this for us, but why bother sending the data?
print header(-status=>'304',
+ -charset=>'UTF-8',
-type=>$Mime{param('gFormat')},
-expires=>&time2str($out), -last_modified=>$lm);
}
|