Bug 6752: Be stricter with utf-8 encoding of output
[koha.git] / reports / serials_stats.pl
index 3143bd0..88918cc 100755 (executable)
@@ -13,9 +13,9 @@
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
 use warnings;
@@ -48,7 +48,6 @@ my $expired    = $input->param("expired");
 my $order      = $input->param("order");
 my $output     = $input->param("output");
 my $basename   = $input->param("basename");
-my $mime       = $input->param("MIME");
 our $sep       = $input->param("sep") || '';
 $sep = "\t" if ($sep eq 'tabulation');
 
@@ -104,7 +103,7 @@ if($do_it){
         $template->param(datas => \@datas,
                          do_it => 1);
     }else{
-        binmode STDOUT, ':utf8';
+        binmode STDOUT, ':encoding(UTF-8)';
         print $input->header(-type => 'application/vnd.sun.xml.calc',
                          -encoding => 'utf-8',
                              -name => "$basename.csv",
@@ -154,12 +153,10 @@ if($do_it){
                push @branchloop, \%row;
        } 
     
-    my @mime = ( C4::Context->preference("MIME") );
-       # warn 'MIME(s): ' . join ' ', @mime;
        my $CGIextChoice=CGI::scrolling_list(
                                -name => 'MIME',
                                -id => 'MIME',
-                               -values   => \@mime,
+                               -values   => ['CSV'], # FIXME translation
                                -size     => 1,
                                -multiple => 0 );
        my $CGIsepChoice=GetDelimiterChoices;