Bug 10110 - Problems with diacritics in saved SQL reports
Summary: Problems with diacritics in saved SQL reports
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact:
URL:
Keywords:
: 11437 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-25 05:54 UTC by Katrin Fischer
Modified: 2014-12-07 20:03 UTC (History)
3 users (show)

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


Attachments
Bug 10010: Problems with diacritics in saved SQL reports (2.03 KB, patch)
2013-04-25 12:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 10110 Followup for Acquisition.pm (1.05 KB, patch)
2013-04-25 12:51 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 10110: Problems with diacritics in saved SQL reports (2.08 KB, patch)
2013-04-25 12:53 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 10110 Followup for Acquisition.pm (1.06 KB, patch)
2013-04-26 13:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10110: Problems with diacritics in saved SQL reports (2.10 KB, patch)
2013-04-26 13:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 10110: Problems with diacritics in saved SQL reports (2.67 KB, patch)
2013-04-27 09:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10110 Followup for Acquisition.pm (1.04 KB, patch)
2013-04-27 09:54 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 10110 Followup for Acquisition.pm (1.15 KB, patch)
2013-04-27 09:56 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2013-04-25 05:54:16 UTC
Koha messes up diacritics used for naming columns in SQL reports.

Example SQL:
select branchname  as "Bibliothek (üöä)" from branches where branchcode = <<Bibliothekskürzel|branches>>

1) Create report with given example SQL or your own including some diacritics in the columnnames
2) Save the report and run it
3) Verify column names are not displayed correctly.
Comment 1 Marcel de Rooy 2013-04-25 12:42:30 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2013-04-25 12:51:24 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2013-04-25 12:53:10 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2013-04-26 13:23:07 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2013-04-26 13:23:20 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2013-04-27 09:53:13 UTC
Created attachment 17743 [details] [review]
[PASSED QA] Bug 10110: Problems with diacritics in saved SQL reports

Adds decoding for cgi params (for completeness).
Apparently, the NAME attribute of DBI statement handle has a UTF8 bug.
Fixing this by decoding the returned column names.
Did this in a shared routine.

http://bugs.koha-community.org/show_bug.cgi?id=10110
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Copying test plan from bug report:

Example SQL:
select
branchname as "Bibliothek (üöä)",
branchname "Bibiothek (üäa)",
branchname
from branches where branchcode = <<Bibliothekskürzel|branches>>

1) Create report with given example SQL or your own including
   some diacritics in the columnnames
2) Save the report and run it
3) Verify column names are broken before patch, but fixed after..

All tests and QA script pass.
Comment 7 Katrin Fischer 2013-04-27 09:54:51 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2013-04-27 09:56:22 UTC
Created attachment 17745 [details] [review]
[PASSED QA] Bug 10110 Followup for Acquisition.pm

Adding a FIXE at a line that uses $sth->{NAME} for possible utf8 problems.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds a comment, no danger from that.
Comment 9 Jared Camins-Esakov 2013-04-27 11:16:27 UTC
This patch has been pushed to master and 3.12.x.
Comment 10 Chris Cormack 2013-04-27 21:40:50 UTC
Pushed to 3.10.x will be in 3.10.6
Comment 11 Mathieu Saby 2013-12-24 16:50:47 UTC
*** Bug 11437 has been marked as a duplicate of this bug. ***