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

(-)a/basket/downloadcart.pl (-10 / +3 lines)
Lines 71-86 if ($bib_list && $format) { Link Here
71
            next unless $record;
71
            next unless $record;
72
72
73
            if ($format eq 'iso2709') {
73
            if ($format eq 'iso2709') {
74
                my $usmarc = $record->as_usmarc();
74
                #NOTE: If we don't explicitly UTF-8 encode the output,
75
                if ($usmarc){
75
                #the browser will guess the encoding, and it won't always choose UTF-8.
76
                    #NOTE: If we don't explicitly UTF-8 encode the output,
76
                $output .= encode("UTF-8", $record->as_usmarc()) // q{};
77
                    #the browser will guess the encoding, and it won't always choose UTF-8.
78
                    my $bytes = encode("UTF-8", $usmarc);
79
                    if ($bytes) {
80
                        $output .= $bytes;
81
                    }
82
83
                }
84
            }
77
            }
85
            elsif ($format eq 'ris') {
78
            elsif ($format eq 'ris') {
86
                $output .= marc2ris($record);
79
                $output .= marc2ris($record);
(-)a/opac/opac-downloadcart.pl (-10 / +3 lines)
Lines 90-104 if ($bib_list && $format) { Link Here
90
            next unless $record;
90
            next unless $record;
91
91
92
            if ($format eq 'iso2709') {
92
            if ($format eq 'iso2709') {
93
                my $usmarc = $record->as_usmarc();
93
                #NOTE: If we don't explicitly UTF-8 encode the output,
94
                if ($usmarc) {
94
                #the browser will guess the encoding, and it won't always choose UTF-8.
95
                    #NOTE: If we don't explicitly UTF-8 encode the output,
95
                $output .= encode("UTF-8", $record->as_usmarc()) // q{};
96
                    #the browser will guess the encoding, and it won't always choose UTF-8.
97
                    my $bytes = encode("UTF-8", $usmarc);
98
                    if ($bytes) {
99
                        $output .= $bytes;
100
                    }
101
                }
102
            }
96
            }
103
            elsif ($format eq 'ris') {
97
            elsif ($format eq 'ris') {
104
                $output .= marc2ris($record);
98
                $output .= marc2ris($record);
105
- 

Return to bug 17842