Lines 404-411
binmode( STDOUT, ':encoding(UTF-8)' );
Link Here
|
404 |
our $csv; # the Text::CSV_XS object |
404 |
our $csv; # the Text::CSV_XS object |
405 |
our $csv_fh; # the filehandle to the CSV file. |
405 |
our $csv_fh; # the filehandle to the CSV file. |
406 |
if ( defined $csvfilename ) { |
406 |
if ( defined $csvfilename ) { |
407 |
my $sep_char = C4::Context->preference('CSVDelimiter') || ';'; |
407 |
my $sep_char = C4::Context->csv_delimiter; |
408 |
$sep_char = "\t" if ($sep_char eq 'tabulation'); |
|
|
409 |
$csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } ); |
408 |
$csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } ); |
410 |
if ( $csvfilename eq '' ) { |
409 |
if ( $csvfilename eq '' ) { |
411 |
$csv_fh = *STDOUT; |
410 |
$csv_fh = *STDOUT; |
Lines 833-839
END_SQL
Link Here
|
833 |
# Generate the content of the csv with headers |
832 |
# Generate the content of the csv with headers |
834 |
my $content; |
833 |
my $content; |
835 |
if ( defined $csvfilename ) { |
834 |
if ( defined $csvfilename ) { |
836 |
my $delimiter = C4::Context->preference('CSVDelimiter') || ';'; |
835 |
my $delimiter = C4::Context->csv_delimiter; |
837 |
$content = join($delimiter, qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n"; |
836 |
$content = join($delimiter, qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n"; |
838 |
} |
837 |
} |
839 |
else { |
838 |
else { |