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

(-)a/C4/Biblio.pm (-1 / +1 lines)
Lines 1158-1164 sub GetMarcBiblio { Link Here
1158
1158
1159
    if ($marcxml) {
1159
    if ($marcxml) {
1160
        $record = eval {
1160
        $record = eval {
1161
            MARC::Record::new_from_xml( $marcxml, "utf8",
1161
            MARC::Record::new_from_xml( $marcxml, "UTF-8",
1162
                C4::Context->preference('marcflavour') );
1162
                C4::Context->preference('marcflavour') );
1163
        };
1163
        };
1164
        if ($@) { warn " problem with :$biblionumber : $@ \n$marcxml"; }
1164
        if ($@) { warn " problem with :$biblionumber : $@ \n$marcxml"; }
(-)a/Koha/Biblio/Metadata.pm (-1 / +1 lines)
Lines 67-73 sub record { Link Here
67
    my $record;
67
    my $record;
68
68
69
    if ( $self->format eq 'marcxml' ) {
69
    if ( $self->format eq 'marcxml' ) {
70
        $record = eval { MARC::Record::new_from_xml( $self->metadata, 'utf-8', $self->schema ); };
70
        $record = eval { MARC::Record::new_from_xml( $self->metadata, 'UTF-8', $self->schema ); };
71
        my $marcxml_error = $@;
71
        my $marcxml_error = $@;
72
        chomp $marcxml_error;
72
        chomp $marcxml_error;
73
        unless ($record) {
73
        unless ($record) {
(-)a/misc/batchRebuildBiblioTables.pl (-1 / +1 lines)
Lines 63-69 while (my ($biblionumber, $frameworkcode) = $sth->fetchrow) { Link Here
63
63
64
    $marcxml = C4::Charset::StripNonXmlChars( $marcxml );
64
    $marcxml = C4::Charset::StripNonXmlChars( $marcxml );
65
    my $record = eval {
65
    my $record = eval {
66
        MARC::Record::new_from_xml($marcxml, 'utf8', $marcflavour);
66
        MARC::Record::new_from_xml($marcxml, 'UTF-8', $marcflavour);
67
    };
67
    };
68
    if ($@) {
68
    if ($@) {
69
        push @errors, $biblionumber;
69
        push @errors, $biblionumber;
(-)a/misc/migration_tools/build_oai_sets.pl (-1 / +1 lines)
Lines 121-127 foreach my $res (@$results) { Link Here
121
    MARC::File::XML->default_record_format(C4::Context->preference('marcflavour'));
121
    MARC::File::XML->default_record_format(C4::Context->preference('marcflavour'));
122
    my $record;
122
    my $record;
123
    eval {
123
    eval {
124
        $record = MARC::Record::new_from_xml($marcxml, "utf8", C4::Context->preference('marcflavour'));
124
        $record = MARC::Record::new_from_xml($marcxml, "UTF-8", C4::Context->preference('marcflavour'));
125
    };
125
    };
126
    if($@) {
126
    if($@) {
127
        warn "(biblio $biblionumber) Error while creating record from marcxml: $@";
127
        warn "(biblio $biblionumber) Error while creating record from marcxml: $@";
(-)a/opac/opac-readingrecord.pl (-1 / +1 lines)
Lines 97-103 foreach my $issue ( @{$issues} ) { Link Here
97
    if ( $marcxml ) {
97
    if ( $marcxml ) {
98
        $marcxml = StripNonXmlChars( $marcxml );
98
        $marcxml = StripNonXmlChars( $marcxml );
99
        my $marc_rec =
99
        my $marc_rec =
100
          MARC::Record::new_from_xml( $marcxml, 'utf8',
100
          MARC::Record::new_from_xml( $marcxml, 'UTF-8',
101
            C4::Context->preference('marcflavour') );
101
            C4::Context->preference('marcflavour') );
102
        $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') );
102
        $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') );
103
    }
103
    }
(-)a/svc/bib (-1 / +1 lines)
Lines 90-96 sub update_bib { Link Here
90
    my $inxml = $query->param('POSTDATA');
90
    my $inxml = $query->param('POSTDATA');
91
    print $query->header(-type => 'text/xml', -charset => 'utf-8');
91
    print $query->header(-type => 'text/xml', -charset => 'utf-8');
92
92
93
    my $record = eval {MARC::Record::new_from_xml( $inxml, "utf8", C4::Context->preference('marcflavour'))};
93
    my $record = eval {MARC::Record::new_from_xml( $inxml, "UTF-8", C4::Context->preference('marcflavour'))};
94
    my $do_not_escape = 0;
94
    my $do_not_escape = 0;
95
    if ($@) {
95
    if ($@) {
96
        $result->{'status'} = "failed";
96
        $result->{'status'} = "failed";
(-)a/svc/import_bib (-1 / +1 lines)
Lines 73-79 sub import_bib { Link Here
73
    }
73
    }
74
74
75
    my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
75
    my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
76
    my $marc_record = eval {MARC::Record::new_from_xml( $inxml, "utf8", $marcflavour)};
76
    my $marc_record = eval {MARC::Record::new_from_xml( $inxml, "UTF-8", $marcflavour)};
77
    if ($@) {
77
    if ($@) {
78
        $result->{'status'} = "failed";
78
        $result->{'status'} = "failed";
79
        $result->{'error'} = $@;
79
        $result->{'error'} = $@;
(-)a/svc/new_bib (-2 / +1 lines)
Lines 54-60 sub add_bib { Link Here
54
    print $query->header(-type => 'text/xml', -charset => 'utf-8');
54
    print $query->header(-type => 'text/xml', -charset => 'utf-8');
55
55
56
    my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
56
    my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
57
    my $record = eval {MARC::Record::new_from_xml( $inxml, "utf8", $marcflavour)};
57
    my $record = eval {MARC::Record::new_from_xml( $inxml, "UTF-8", $marcflavour)};
58
    my $do_not_escape = 0;
58
    my $do_not_escape = 0;
59
    if ($@) {
59
    if ($@) {
60
        $result->{'status'} = "failed";
60
        $result->{'status'} = "failed";
61
- 

Return to bug 24827