SuperCat SRU double-encodes UTF8 characters, does not set character encoding

Bug #1431541 reported by Dan Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.6
Won't Fix
Undecided
Unassigned
2.7
Fix Released
Medium
Unassigned
2.8
Fix Released
Undecided
Unassigned

Bug Description

* Evergreen master
* Ubuntu 12.04

Tested with a 2.7 production system, the HTTP header was setting the charset to ISO-8859-1 (per Apache defaults I believe) because the SuperCat SRU methods were not themselves setting an explicit header. For an example, try:

curl -I 'https://laurentian.concat.ca/opac/extras/sru/LUSYS/holdings?version=1.1&operation=searchRetrieve&query=societes&maximumRecords=11'

(replacing hostname / library shortname / search query as necessary).

Also, perhaps due to changes in Encode or MARC::XML behaviour on Ubuntu 12.04, it seems that the encode_utf8() call for $marc->as_xml_record() is no longer necessary; in fact, it corrupts any non-ASCII characters. Which isn't good.

Tags: pullrequest
Revision history for this message
Dan Scott (denials) wrote :

See http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/lp1431541_supercat_sru_encoding for a very simple fix, tested and in production on an Ubuntu 12.04 system that has a whole ton of non-ASCII characters.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.8.0
Revision history for this message
Mike Rylander (mrylander) wrote :

Dan, that looks entirely sane. Seems this is relevant for backport to 2.6+ ... no?

Revision history for this message
Dan Scott (denials) wrote :

Mike, yes, I believe this should be backported to 2.6. I'll set the milestones accordingly!

Bill Erickson (berick)
Changed in evergreen:
milestone: 2.8.0 → 2.8.1
Changed in evergreen:
milestone: 2.8.1 → 2.8.3
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Ben Shum (bshum) wrote :

Fix pushed to master and backported to rel_2_8 and rel_2_7.

Changed in evergreen:
status: Triaged → Fix Committed
milestone: 2.8.3 → 2.9-beta
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.