Bug 6996 - Encoding problem in opac-showmarc
Summary: Encoding problem in opac-showmarc
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Marcel de Rooy
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 10:13 UTC by Marcel de Rooy
Modified: 2012-10-25 23:09 UTC (History)
3 users (show)

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


Attachments
Patch (1.12 KB, patch)
2011-10-10 10:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Patch (1.24 KB, patch)
2011-10-10 11:04 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Revised patch (1.26 KB, patch)
2011-10-10 13:13 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Revised patch (1.28 KB, patch)
2011-10-10 13:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
screenshot before patch (47.29 KB, image/png)
2011-10-10 22:01 UTC, Katrin Fischer
Details
screenshot after patch was applied (49.61 KB, image/png)
2011-10-10 22:02 UTC, Katrin Fischer
Details
Revised patch (1.20 KB, patch)
2011-10-12 12:53 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6996: Encoding problem in opac-showmarc (1.30 KB, patch)
2011-10-12 20:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 6996: Encoding problem in opac-showmarc (1.34 KB, patch)
2011-10-18 15:19 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2011-10-10 10:13:53 UTC
This problem is related to bug 5616.
If you click on Plain view in the OPAC MARC detail view, accented characters are not displayed correctly.
This comes from opac-showmarc.pl.
The output coming back from the xslt processor should be decoded in order to resolve the problem.

Sending a patch.
Comment 1 Marcel de Rooy 2011-10-10 10:19:05 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2011-10-10 11:04:31 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2011-10-10 13:02:36 UTC
Note that it is not needed to decode data from LibXSLT if the stylesheet
contains the instruction to use UTF8. (See CPAN.)
Extending the code therefore with a test on utf8 flag.
Comment 4 Marcel de Rooy 2011-10-10 13:13:04 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2011-10-10 13:15:37 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2011-10-10 22:01:49 UTC
Created attachment 5831 [details]
screenshot before patch

Hi Marcel, 
I used a record with German umlauts for testing and made sure, they were correctly cataloged. The umlauts show correctly on the other views, but on plain MARC view they are broken before and after applying for patch. Do I miss something?
Comment 7 Katrin Fischer 2011-10-10 22:02:09 UTC
Created attachment 5832 [details]
screenshot after patch was applied
Comment 8 Marcel de Rooy 2011-10-12 12:48:03 UTC
Hi Katrin,
Thanks for testing. I guess that your problem had to do with using only characters with accents from the Latin range. I could repeat your problem with some umlauts on vowels. When I adding non-Latin unicode chars, the display was correct again. The Latin chars only do not set the UTF8 flag. The other chars do set the UTF8 flag.
I corrected the problem by specifically adding utf8 on the output handle (giving perl no chance to make the wrong guess).
New patch forthcoming.
Comment 9 Marcel de Rooy 2011-10-12 12:53:37 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2011-10-12 20:55:07 UTC Comment hidden (obsolete)
Comment 11 Paul Poulain 2011-10-18 15:19:12 UTC
QA comment :
  * good description
  * works also with UNIMARC (and the problem also existed in UNIMARC)

Marking passed QA
Comment 12 Paul Poulain 2011-10-18 15:19:28 UTC
Created attachment 5956 [details] [review]
Bug 6996: Encoding problem in opac-showmarc

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No more encoding problems spotted.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 13 Chris Cormack 2011-10-19 03:39:53 UTC
Pushed, please test