diff options
-rw-r--r-- | perllib/FixMyStreet/Geocode.pm | 1 | ||||
-rw-r--r-- | perllib/Page.pm | 6 | ||||
-rwxr-xr-x | web/photo.cgi | 2 | ||||
-rwxr-xr-x | web/reports.cgi | 8 |
4 files changed, 9 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/Geocode.pm b/perllib/FixMyStreet/Geocode.pm index 475b2f9bc..17a4d8539 100644 --- a/perllib/FixMyStreet/Geocode.pm +++ b/perllib/FixMyStreet/Geocode.pm @@ -147,6 +147,7 @@ sub list_choices { my $out = '<p>' . $message . '</p>'; my $choice_list = '<ul>'; foreach my $choice (@$choices) { + $choice = decode_utf8($choice); $choice =~ s/, United Kingdom//; $choice =~ s/, UK//; $url = Cobrand::url($cobrand, NewURL($q, -retain => 1, -url => $page, 'pc' => $choice), $q); diff --git a/perllib/Page.pm b/perllib/Page.pm index 5f641f0bd..4e4e74169 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -50,9 +50,9 @@ use FixMyStreet::Map; my $lastmodified; sub do_fastcgi { - my ($func, $lm) = @_; + my ($func, $lm, $binary) = @_; - #binmode(STDOUT, ":utf8"); + binmode(STDOUT, ":utf8") unless $binary; try { my $W = new mySociety::WatchUpdate(); @@ -114,7 +114,7 @@ sub microsite { my $lang; $lang = 'cy' if $host =~ /cy/; $lang = 'en-gb' if $host =~ /^en\./; - Cobrand::set_lang_and_domain(get_cobrand($q), $lang); # , 1); + Cobrand::set_lang_and_domain(get_cobrand($q), $lang, 1); Problems::set_site_restriction($q); Memcached::set_namespace(mySociety::Config::get('BCI_DB_NAME') . ":"); diff --git a/web/photo.cgi b/web/photo.cgi index fc89fc0f7..bd38e3bf1 100755 --- a/web/photo.cgi +++ b/web/photo.cgi @@ -39,7 +39,7 @@ sub main { print $photo; } -Page::do_fastcgi(\&main); +Page::do_fastcgi(\&main, 0, 1); sub resize { my ($photo, $size) = @_; diff --git a/web/reports.cgi b/web/reports.cgi index 1b8557a06..f0ecf9c7a 100755 --- a/web/reports.cgi +++ b/web/reports.cgi @@ -134,7 +134,7 @@ sub main { } my $type = 'council_problems'; # Problems sent to a council my (@params, %title_params); - $title_params{COUNCIL} = encode_utf8($area_name); + $title_params{COUNCIL} = $area_name; push @params, $one_council->{id} if $rss eq 'reports'; push @params, $ward ? $ward->{id} : $one_council->{id}; if ($ward && $rss eq 'reports') { @@ -213,9 +213,9 @@ sub main { my $url = Page::short_name($areas_info->{$_}, $areas_info); my $cobrand_url = Cobrand::url($cobrand, "/reports/$url", $q); print '><td align="left"><a href="' . $cobrand_url . '">' . - encode_utf8($areas_info->{$_}->{name}); + $areas_info->{$_}->{name}; if ($areas_info->{$_}->{parent_area} && $url =~ /,|%2C/) { - print ', ' . encode_utf8($areas_info->{$areas_info->{$_}->{parent_area}}->{name}); + print ', ' . $areas_info->{$areas_info->{$_}->{parent_area}}->{name}; } print '</a></td>'; summary_cell(\@{$open{$_}{new}}); @@ -234,7 +234,7 @@ sub main { } print '</table>'; } else { - my $name = encode_utf8($one_council->{name}); + my $name = $one_council->{name}; if (!$name) { print Page::header($q, title=>_("Summary reports")); print "Council with identifier " . ent($one_council->{id}). " not found. "; |