https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44125 Bug ID: 44125 Summary: Serial claims CSV export breaks non-ASCII characters Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: adolfo.rodriguez@xercode.es QA Contact: testopia@bugs.koha-community.org Target Milestone: --- The CSV file generated by "Download selected claims" on the serials claims page (serials/lateissues-export.pl) breaks every non-ASCII character. The script prints the rows to STDOUT without an encoding layer, so Perl writes one Latin-1 byte for each accented character instead of its UTF-8 sequence. The HTTP header does not help either: it is sent as "plain/text" (not a valid media type) and CGI adds the default "charset=ISO-8859-1". When the file is opened as UTF-8, the characters show as U+FFFD (e.g. "Año de la filosofÃa" becomes "A�o de la filosof�a"). This affects the data (title, issue number, vendor name) and the headers of CSV profiles with accented column names. Other CSV exports set binmode STDOUT, ':encoding(UTF-8)' before printing (e.g. tools/inventory.pl, reports/serials_stats.pl), but lateissues-export.pl never got it. To reproduce: 1. Create a vendor, and a subscription with that vendor for a record whose title has accented characters (e.g. "Año de la filosofÃa"). 2. Make one of its issues late (status Late, planned date in the past). 3. Go to Serials > Claims, choose the vendor, select the issue and click "Download selected claims". 4. Open the CSV as UTF-8: the accented characters are broken. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.