[open-ils-commits] [GIT] Evergreen ILS branch master updated. 81e6929fc81edabe254cefd782e88c3e4bb81e12

Evergreen Git git at git.evergreen-ils.org
Tue Aug 18 23:10:03 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  81e6929fc81edabe254cefd782e88c3e4bb81e12 (commit)
      from  0cbc35b72615a56ed8ad9a0dd0dd89261111b0dd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 81e6929fc81edabe254cefd782e88c3e4bb81e12
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Mar 12 16:06:16 2015 -0400

    LP1431541: SRU UTF8 encoding issues
    
    The SuperCat SRU service was encoding MARCXML using an encode_utf8()
    call that ended up corrupting non-ASCII characters. In addition, the
    HTTP header charset was not being set, meaning that the return header
    would default to ISO-8859-1.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
index 873b956..521b66c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -1969,8 +1969,7 @@ sub sru_search {
                     }
                 }
 
-                # Ensure the data is encoded as UTF8 before we hand it off
-                $marcxml = encode_utf8($marc->as_xml_record());
+                $marcxml = $marc->as_xml_record();
                 $marcxml =~ s/^<\?xml version="1.0" encoding="UTF-8"\?>//o;
 
             }
@@ -1999,7 +1998,7 @@ sub sru_search {
         );
     }
 
-    print $cgi->header( -type => 'application/xml' );
+    print $cgi->header( -type => 'application/xml', -charset => 'UTF-8' );
     print $U->entityize($resp->asXML) . "\n";
     return Apache2::Const::OK;
 }
@@ -2116,7 +2115,7 @@ sub sru_auth_search {
         );
     }
 
-    print $cgi->header( -type => 'application/xml' );
+    print $cgi->header( -type => 'application/xml', -charset => 'UTF-8' );
     print $U->entityize($resp->asXML) . "\n";
     return Apache2::Const::OK;
 }

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list