Bug 11704

Summary: Wrong headers in {opac|intranet}/svc/report
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: ReportsAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Evidence of wrong headers
Bug 11704: Make */svc/report print the correct headers
Evidence of good headers (with the patch)
Bug 11704: Make */svc/report print the correct headers
Bug 11704: Make */svc/report print the correct headers

Description Tomás Cohen Arazi (tcohen) 2014-02-06 20:25:56 UTC
As they are not made explicit, the opac/svc/report script falls back to ISO-8859 encoding.

To reproduce:
- Create a PUBLIC report from SQL like:

SELECT title, author
FROM biblio
LIMIT 10

- Make sure the report (tweak it so that...) returns some titles/authors that contain diacritics and non-latin characters (e.g. صة).
- Call the report from the OPAC like:
  http://opac/cgi-bin/koha/svc/report?id=1%name=Tomas
=> Notice the characters are broken
- Call the report from the STAFF interface like:
  http://opac/cgi-bin/koha/svc/report?id=1%name=Tomas
=> Notice the characters are broken

Note:
 - 1 is the report's ID
 - "Tomas" is an arbitrary string I guess
Comment 1 Tomás Cohen Arazi (tcohen) 2014-02-06 20:29:24 UTC
Created attachment 25107 [details]
Evidence of wrong headers
[+] Comment 2 Tomás Cohen Arazi (tcohen) 2014-02-06 20:34:22 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi (tcohen) 2014-02-06 20:41:22 UTC
Created attachment 25109 [details]
Evidence of good headers (with the patch)
[+] Comment 4 Chris Cormack 2014-02-10 20:45:06 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2014-02-11 09:10:47 UTC
Created attachment 25191 [details] [review]
Bug 11704: Make */svc/report print the correct headers

To test:
1 - Go through the first comments instructions to reproduce
    and verify the bug is present (OPAC and STAFF)
2 - Apply the patch
3 - Repeat step 1 and notice
   * characters are not broken anymore
   * the header is correct
4 - Sign off

Regards
To+

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Galen Charlton 2014-02-13 03:00:13 UTC
Pushed to master.  Thanks, Tomás!
Comment 7 Fridolin Somers 2014-05-19 13:51:45 UTC
Pushed to 3.14.x, will be in 3.14.07.
Comment 8 Kyle M Hall (khall) 2014-06-06 13:50:15 UTC
Pushed to 3.12.x will be in 3.12.13