Bug 14817: (follow-up) Fix encoding issues in columns.def
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 16 Sep 2015 08:24:07 +0000 (09:24 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 25 Sep 2015 14:15:18 +0000 (11:15 -0300)
Follow-up for reports.

Test plan:
1/ Use a translated template (fr-FR or ar-Arab)
2/ Go on the report guided page, step 3
3/ The field names should be correctly encoded.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

C4/Reports/Guided.pm

index c714213..cb09651 100644 (file)
@@ -884,7 +884,7 @@ sub _get_column_defs {
     my ($theme, $lang, $availablethemes) = C4::Templates::themelanguage($htdocs, 'about.tt', $section, $cgi);
 
     my $full_path_to_columns_def_file="$htdocs/$theme/$lang/$columns_def_file";
-    open (my $fh, $full_path_to_columns_def_file);
+    open (my $fh, '<:encoding(utf-8)', $full_path_to_columns_def_file);
     while ( my $input = <$fh> ){
         chomp $input;
         if ( $input =~ m|<field name="(.*)">(.*)</field>| ) {