[Koha-bugs] [Bug 32012] runreport.pl should use binmode UTF-8
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Nov 2 15:25:11 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32012
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #142704|0 |1
is obsolete| |
--- Comment #9 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 142986
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142986&action=edit
Bug 32012: runreport.pl should use binmode UTF-8
Like Bug 26832 added binmode UTF-8 to script
misc/search_tools/export_elasticsearch_mappings.pl, this should be added to
misc/cronjobs/runreport.pl.
Test plan :
1) Do not apply patch
2) Create a SQL report with :
SELECT 'accentué',barcode FROM items limit 3
3) Note the id of this report, for example 1
4) Run : misc/cronjobs/runreport.pl 1 --format csv | tee /tmp/without.csv
=> You see output with unknown character instead of é :
5) Run : file --mime-type /tmp/without.csv
=> You see : /tmp/without.csv: iso-8859-1
6) Apply patch
7) Run : misc/cronjobs/runreport.pl 1 --format csv | tee /tmp/with.csv
=> You see correct output with é
8) Run : file --mime-type /tmp/without.csv
=> You see : /tmp/without.csv: utf-8
Signed-off-by: David Nind <david at davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list