[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
Thu Oct 27 11:48:08 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32012

Fridolin Somers <fridolin.somers at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #142701|0                           |1
        is obsolete|                            |

--- Comment #4 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Created attachment 142702
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142702&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 : S
   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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list