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

(-)a/tools/import_borrowers.pl (-5 / +3 lines)
Lines 48-59 use C4::Members::AttributeTypes; Link Here
48
use C4::Members::Messaging;
48
use C4::Members::Messaging;
49
49
50
use Text::CSV;
50
use Text::CSV;
51
# Text::CSV::Unicode, even in binary mode, fails to parse lines with these diacriticals:
51
use utf8;
52
# ė
53
# č
54
52
55
use CGI;
53
use CGI;
56
# use encoding 'utf8';    # don't do this
57
54
58
my (@errors, @feedback);
55
my (@errors, @feedback);
59
my $extended = C4::Context->preference('ExtendedPatronAttributes');
56
my $extended = C4::Context->preference('ExtendedPatronAttributes');
Lines 115-120 if ( $uploadborrowers && length($uploadborrowers) > 0 ) { Link Here
115
112
116
    # use header line to construct key to column map
113
    # use header line to construct key to column map
117
    my $borrowerline = <$handle>;
114
    my $borrowerline = <$handle>;
115
    utf8::decode($borrowerline);
118
    my $status = $csv->parse($borrowerline);
116
    my $status = $csv->parse($borrowerline);
119
    ($status) or push @errors, {badheader=>1,line=>$., lineraw=>$borrowerline};
117
    ($status) or push @errors, {badheader=>1,line=>$., lineraw=>$borrowerline};
120
    my @csvcolumns = $csv->fields();
118
    my @csvcolumns = $csv->fields();
Lines 138-143 if ( $uploadborrowers && length($uploadborrowers) > 0 ) { Link Here
138
    my $date_re = C4::Dates->new->regexp('syspref');
136
    my $date_re = C4::Dates->new->regexp('syspref');
139
    my  $iso_re = C4::Dates->new->regexp('iso');
137
    my  $iso_re = C4::Dates->new->regexp('iso');
140
    LINE: while ( my $borrowerline = <$handle> ) {
138
    LINE: while ( my $borrowerline = <$handle> ) {
139
        utf8::decode($borrowerline);
141
        my %borrower;
140
        my %borrower;
142
        my @missing_criticals;
141
        my @missing_criticals;
143
        my $patron_attributes;
142
        my $patron_attributes;
144
- 

Return to bug 11811