View | Details | Raw Unified | Return to bug 6554
Collapse All | Expand All

(-)a/C4/Output.pm (-6 / +1 lines)
Lines 298-314 sub output_with_http_headers { Link Here
298
        $options->{'Content-Script-Type'} = 'text/javascript';
298
        $options->{'Content-Script-Type'} = 'text/javascript';
299
    }
299
    }
300
300
301
# We can't encode here, that will double encode our templates, and xslt
302
# We need to fix the encoding as it comes out of the database, or when we pass the variables to templates
303
 
304
#    utf8::encode($data) if utf8::is_utf8($data);
305
306
    $data =~ s/\&amp\;amp\; /\&amp\; /g;
301
    $data =~ s/\&amp\;amp\; /\&amp\; /g;
302
    utf8::encode($data);
307
    print $query->header($options), $data;
303
    print $query->header($options), $data;
308
}
304
}
309
305
310
sub output_html_with_http_headers {
306
sub output_html_with_http_headers {
311
    binmode( STDOUT, ":encoding(utf8)" );
312
    my ( $query, $cookie, $data, $status ) = @_;
307
    my ( $query, $cookie, $data, $status ) = @_;
313
    output_with_http_headers( $query, $cookie, $data, 'html', $status );
308
    output_with_http_headers( $query, $cookie, $data, 'html', $status );
314
}
309
}
(-)a/C4/XSLT.pm (-2 / +2 lines)
Lines 221-227 sub XSLTParse4Display { Link Here
221
        $stylesheet->{$xslfilename} = $xslt->parse_stylesheet($style_doc);
221
        $stylesheet->{$xslfilename} = $xslt->parse_stylesheet($style_doc);
222
    }
222
    }
223
    my $results      = $stylesheet->{$xslfilename}->transform($source);
223
    my $results      = $stylesheet->{$xslfilename}->transform($source);
224
    my $newxmlrecord = $stylesheet->{$xslfilename}->output_string($results);
224
    my $newxmlrecord = $stylesheet->{$xslfilename}->output_as_chars($results);
225
    #no need to decode with UTF-8 in header of XSLT templates: BZ 6554
225
    return $newxmlrecord;
226
    return $newxmlrecord;
226
}
227
}
227
228
228
- 

Return to bug 6554