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