https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39023 Bug ID: 39023 Summary: Add utf8 output to CSV output of overdue_notices.pl Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: davewood@gmx.at QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz the misc/cronjobs/overdue_notices.pl script produces output/files with confusing encoding apparently depending on the content of the lines written. sometimes with characters encoded in latin1 or utf8 in the same file. https://github.com/Koha-Community/Koha/blob/main/misc/cronjobs/overdue_notic... ``` - open $csv_fh, ">", $csvfilename or die "unable to open $csvfilename: $!"; + open $csv_fh, ">:encoding(UTF-8)", $csvfilename or die "unable to open $csvfilename: $!"; ``` there is possible more needed to fix this then just changing this one line. ``` overdue_notices.pl -v -test -list-all -date="2024-11-01" -csv="overdue.csv" -library="AT-LBST" ``` # examples # ASCII text (only csv headers present) # ISO-8859 text (if german umlauts are present) # Non-ISO extended-ASCII text (if german umlauts AND "č" present) ``` ls 202501*|xargs file 20250101_0310_overdue_test.csv: ASCII text 20250102_0310_overdue_test.csv: ASCII text 20250103_0310_overdue_test.csv: ISO-8859 text 20250104_0310_overdue_test.csv: ASCII text 20250105_0310_overdue_test.csv: ASCII text 20250106_0310_overdue_test.csv: ASCII text 20250107_0310_overdue_test.csv: ISO-8859 text 20250108_0310_overdue_test.csv: ISO-8859 text, with very long lines 20250109_0310_overdue_test.csv: Non-ISO extended-ASCII text, with very long lines 20250110_0310_overdue_test.csv: Non-ISO extended-ASCII text 20250111_0310_overdue_test.csv: ASCII text 20250112_0310_overdue_test.csv: ASCII text 20250113_0310_overdue_test.csv: ISO-8859 text 20250114_0310_overdue_test.csv: Non-ISO extended-ASCII text, with very long lines 20250115_0310_overdue_test.csv: ISO-8859 text, with very long lines 20250116_0310_overdue_test.csv: ISO-8859 text 20250117_0310_overdue_test.csv: ISO-8859 text 20250118_0310_overdue_test.csv: ASCII text 20250119_0310_overdue_test.csv: ASCII text 20250120_0310_overdue_test.csv: ISO-8859 text 20250121_0310_overdue_test.csv: ISO-8859 text 20250122_0310_overdue_test.csv: ISO-8859 text 20250123_0310_overdue_test.csv: ISO-8859 text 20250124_0310_overdue_test.csv: Non-ISO extended-ASCII text, with very long lines 20250125_0310_overdue_test.csv: ASCII text 20250126_0310_overdue_test.csv: ASCII text 20250127_0310_overdue_test.csv: Non-ISO extended-ASCII text 20250128_0310_overdue_test.csv: ISO-8859 text 20250129_0310_overdue_test.csv: ASCII text 20250130_0310_overdue_test.csv: ASCII text 20250131_0310_overdue_test.csv: Non-ISO extended-ASCII text, with very long lines ``` old bugs of the same kind in overdue_notices.pl https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8687 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26601 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.