[Koha-patches] [PATCH] Fixes bug #2773
Galen Charlton
galen.charlton at liblime.com
Mon Nov 17 16:38:22 CET 2008
Hi Frederic,
I think this is the wrong place to filter out those characters, which
are present only in MARC records. Doing a UTF-8 encode and decode in
output_html_with_http_headers applies the string processing cost to
every page, including those that do not display any MARC data.
Regards,
Galen
On Tue, Nov 11, 2008 at 5:01 AM, Frederic Demians <f.demians at tamil.fr> wrote:
> ---
> C4/Output.pm | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/C4/Output.pm b/C4/Output.pm
> index fd32541..0668873 100644
> --- a/C4/Output.pm
> +++ b/C4/Output.pm
> @@ -364,6 +364,11 @@ sub output_html_with_http_headers ($$$;$) {
> my $query = shift;
> my $cookie = shift;
> my $html = shift;
> + require Encode;
> + $html = Encode::decode_utf8( $html );
> + $html =~ s/\x88//g;
> + $html =~ s/\x89//g;
> + $html = Encode::encode( "utf8", $html );
> my $content_type = @_ ? shift : "text/html";
> $content_type = "text/html" unless $content_type =~ m!/!; # very basic sanity check
> print $query->header(
> --
> 1.5.5.GIT
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>
--
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt
More information about the Koha-patches
mailing list