X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Filsdi.pl;h=d68f09af8466cd022b537b58b129b98376db1194;hb=dbaefb626ce5c2022b647fc15e6d0a0d68fa0784;hp=48fd7ba2091c6be49dc344b8eeef13f4cdf8cee2;hpb=aef1dd15fbe37a8a9c30ba4b38f7ecd6c1fea54d;p=koha.git diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl index 48fd7ba209..d68f09af84 100755 --- a/opac/ilsdi.pl +++ b/opac/ilsdi.pl @@ -143,6 +143,10 @@ if ( $cgi->param('service') eq "Describe" and any { $cgi->param('verb') eq $_ } exit 0; } +# any output after this point will be UTF-8 XML +binmode STDOUT, ':encoding(UTF-8)'; +print CGI::header('-type'=>'text/xml', '-charset'=>'utf-8'); + my $out; # If ILS-DI module is disabled in System->Preferences, redirect to 404 @@ -207,7 +211,6 @@ if ( $service and any { $service eq $_ } @services ) { # GetAvailability is a special case, as it cannot use XML::Simple if ( $service eq "GetAvailability" ) { - print CGI::header('text/xml'); print C4::ILSDI::Services::GetAvailability($cgi); exit 0; } else { @@ -228,8 +231,6 @@ if ( $service and any { $service eq $_ } @services ) { } # Output XML by passing the hashref to XMLOut -binmode(STDOUT, ":utf8"); -print CGI::header('-type'=>'text/xml', '-charset'=>'utf-8'); print XMLout( $out, noattr => 1,