When choosing tabulation as the delimiter on a CSV profile for the lost item report, it's exported as shown below:
"E Street shuffle :"\"Heylin, Clinton."\\
Tabs works best as default for Excel, so it would be great to see this fixed.
Reads similar like other older closed bugs like bug 17590 and bug 7251.
Originally found in 20.05.03, but confirmed in master now.
Created attachment 113890 [details] [review]
Bug 27045: Fix items lost report export if delimiter is tab
Created attachment 113891 [details] [review]
Bug 27045: Fix other exports
Hum, I lost myself. I first thought it was because we were not using Text::CSV::Encoded. But found (after I rewrote itemslost.pl export) that it was because of the way we handle "\t".
I think those 2 patches fixes the problem for all the CSV exports, but have only tried with itemslost so far.
Is this ready for testing now?
I don't know, see previous comment. Feel free to test it!
my $delimiter = $csv_profile->csv_separator;
$delimiter = "\t" if $delimiter eq "\\t";
Ah strange :
In system preference stored value is string "tabulation" :
We see in other places :
$delimiter = "\t" if $delimiter eq 'tabulation';
Looks like use of CSVdelimiter is wrong in many places where preference is fetched in TT.
I create a new bug report for that.
Maybe we shoud add a method C4::Context->csv_delimiter() ?
And add a method to TT plugin.
In this case it's independent of the preference - for CSV profile the delimiter is chosen in configuration. But in general both (pref and CSV profiles) need fixing.