Bug 16578

Summary: Wide character warning in opac-export.pl when utf8 chosen
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, jonathan.druart, julian.maurice, kyle, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16578: Fix wide character errors in opac-export.pl
Bug 16578: Fix wide character errors in opac-export.pl
Bug 16578: Same fix for the staff interface
[SIGNED-OFF] Bug 16578: Same fix for the staff interface
Bug 16578: Fix wide character errors in opac-export.pl
Bug 16578: Same fix for the staff interface

Description Tomás Cohen Arazi 2016-05-24 17:22:29 UTC
To reproduce:
- Have records indexed
- Open your OPAC logs:
  $ tail -f /var/log/koha/kohadev/opac-error.log
- Open the detail page in the opac for a record
- Choose Save record > MARC (Unicode/UTF-8)
=> FAIL: opac-export.pl: Wide character in print at /home/vagrant/kohaclone/opac/opac-export.pl line 116., referer: http://localh...
Comment 1 Tomás Cohen Arazi 2016-05-24 17:34:20 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-05-25 13:17:22 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-05-25 17:09:42 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2016-05-27 18:26:52 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-06-10 14:41:04 UTC
Created attachment 52233 [details] [review]
Bug 16578: Fix wide character errors in opac-export.pl

This simple patch fixes wide character warning raised by opac-export.pl when
'MARC (Unicode/UTF-8)' and 'MARC (Unicode/UTF-8, Standard)' formats are chosen for downloading records.

To test:
- Have records indexed
- Open your OPAC logs:
  $ tail -f /var/log/koha/kohadev/opac-error.log
- Open the detail page in the opac for a record
- Choose Save record > MARC (Unicode/UTF-8)
=> FAIL: opac-export.pl: Wide character in print at /home/vagrant/kohaclone/opac/opac-export.pl line 116., referer: http://localh...
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> FAILE opac-export.pl: Wide character in print...
- Apply the patch
- Choose Save record > MARC (Unicode/UTF-8)
=> SUCCESS: No warnings raised.
- Choose Save record > MARC (Unicode/UTF-8, Standard)
=> SUCCESS: No warnings raised.
- Sign off :-D

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2016-06-10 14:41:09 UTC
Created attachment 52234 [details] [review]
Bug 16578: Same fix for the staff interface

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as first patch
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Kyle M Hall 2016-06-10 16:50:13 UTC
Pushed to master for 16.11, thanks Tomas, Jonathan!
Comment 8 Frédéric Demians 2016-06-15 07:42:37 UTC
Pushed in 16.05. Will be in 16.05.01.
Comment 9 Julian Maurice 2016-06-16 08:45:23 UTC
Patches pushed to 3.22.x, will be in 3.22.8