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

(-)a/C4/Biblio.pm (-8 / +8 lines)
Lines 23-34 use strict; Link Here
23
use warnings;
23
use warnings;
24
use Carp;
24
use Carp;
25
25
26
# use utf8;
27
use MARC::Record;
26
use MARC::Record;
28
use MARC::File::USMARC;
27
use MARC::File::USMARC;
29
use MARC::File::XML;
28
use MARC::File::XML;
30
use POSIX qw(strftime);
29
use POSIX qw(strftime);
31
use Module::Load::Conditional qw(can_load);
30
use Module::Load::Conditional qw(can_load);
31
use Encode;
32
32
33
use C4::Koha;
33
use C4::Koha;
34
use C4::Dates qw/format_date/;
34
use C4::Dates qw/format_date/;
Lines 2257-2265 sub TransformHtmlToXml { Link Here
2257
        @$values[$i] =~ s/"/"/g;
2257
        @$values[$i] =~ s/"/"/g;
2258
        @$values[$i] =~ s/'/'/g;
2258
        @$values[$i] =~ s/'/'/g;
2259
2259
2260
        #         if ( !utf8::is_utf8( @$values[$i] ) ) {
2261
        #             utf8::decode( @$values[$i] );
2262
        #         }
2263
        if ( ( @$tags[$i] ne $prevtag ) ) {
2260
        if ( ( @$tags[$i] ne $prevtag ) ) {
2264
            $j++ unless ( @$tags[$i] eq "" );
2261
            $j++ unless ( @$tags[$i] eq "" );
2265
            my $indicator1 = eval { substr( @$indicator[$j], 0, 1 ) };
2262
            my $indicator1 = eval { substr( @$indicator[$j], 0, 1 ) };
Lines 2394-2404 sub TransformHtmlToMarc { Link Here
2394
    foreach my $param_name ( keys %$cgi_params ) {
2391
    foreach my $param_name ( keys %$cgi_params ) {
2395
        if ( $param_name =~ /^tag_/ ) {
2392
        if ( $param_name =~ /^tag_/ ) {
2396
            my $param_value = $cgi_params->{$param_name};
2393
            my $param_value = $cgi_params->{$param_name};
2397
            if ( utf8::decode($param_value) ) {
2394
            eval { $param_value = decode('UTF-8', $param_value,
2395
                                         Encode::FB_CROAK); };
2396
2397
            if ( $@ ) {
2398
                # FIXME - need to do something if string is not valid UTF-8
2399
                carp "Error decoding $param_value: $@";
2400
            } else {
2398
                $cgi_params->{$param_name} = $param_value;
2401
                $cgi_params->{$param_name} = $param_value;
2399
            }
2402
            }
2400
2401
            # FIXME - need to do something if string is not valid UTF-8
2402
        }
2403
        }
2403
    }
2404
    }
2404
2405
2405
- 

Return to bug 10068