Bug 11704 - Wrong headers in {opac|intranet}/svc/report
Summary: Wrong headers in {opac|intranet}/svc/report
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-06 20:25 UTC by Tomás Cohen Arazi
Modified: 2015-06-04 23:30 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Evidence of wrong headers (102.41 KB, image/png)
2014-02-06 20:29 UTC, Tomás Cohen Arazi
Details
Bug 11704: Make */svc/report print the correct headers (1.18 KB, patch)
2014-02-06 20:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Evidence of good headers (with the patch) (106.55 KB, image/png)
2014-02-06 20:41 UTC, Tomás Cohen Arazi
Details
Bug 11704: Make */svc/report print the correct headers (1.23 KB, patch)
2014-02-10 20:45 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 11704: Make */svc/report print the correct headers (1.30 KB, patch)
2014-02-11 09:10 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 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 2014-02-06 20:29:24 UTC
Created attachment 25107 [details]
Evidence of wrong headers
Comment 2 Tomás Cohen Arazi 2014-02-06 20:34:22 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 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 2014-06-06 13:50:15 UTC
Pushed to 3.12.x will be in 3.12.13