Bug 6996

Summary: Encoding problem in opac-showmarc
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: OPACAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, katrin.fischer, paul.poulain
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5616
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Patch
Patch
Revised patch
Revised patch
screenshot before patch
screenshot after patch was applied
Revised patch
[SIGNED-OFF] Bug 6996: Encoding problem in opac-showmarc
Bug 6996: Encoding problem in opac-showmarc

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