[open-ils-commits] [GIT] Evergreen ILS branch rel_2_10 updated. 5cd40451fab07c436957aac5cbc103630d8a2afe

Evergreen Git git at git.evergreen-ils.org
Fri Mar 3 22:13:20 EST 2017


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, rel_2_10 has been updated
       via  5cd40451fab07c436957aac5cbc103630d8a2afe (commit)
      from  0716d6172ebcd7f57c298eab8e48cd21fe299de2 (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 5cd40451fab07c436957aac5cbc103630d8a2afe
Author: Dan Scott <dscott at laurentian.ca>
Date:   Wed Feb 22 11:29:21 2017 -0500

    LP1584891: Export MARC holdings with UTF8 subfields
    
    The --items option of marc_export adds a new MARC 852 field with a
    number of subfields that it retrieves from the database. If those
    subfields (such as call number, copy location, etc) contain Unicode
    characters, then we need to decode the incoming UTF8 characters
    when adding the subfield values to avoid corrupting the MARC.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/support-scripts/marc_export.in b/Open-ILS/src/support-scripts/marc_export.in
index 6e0face..5c0115c 100755
--- a/Open-ILS/src/support-scripts/marc_export.in
+++ b/Open-ILS/src/support-scripts/marc_export.in
@@ -22,6 +22,7 @@ use MARC::Field;
 use MARC::Record;
 use MARC::File::XML (BinaryEncoding => 'UTF-8');
 use Date::Manip::Date;
+use Encode;
 my $U = 'OpenILS::Application::AppUtils';
 
 binmode(STDERR, ':utf8');
@@ -480,13 +481,13 @@ sub next {
                             MARC::Field->new(
                                 '852', '4', ' ',
                                 ($location ? ('a' => $location) : ()),
-                                b => $acp->call_number()->owning_lib()->shortname(),
-                                b => $acp->circ_lib()->shortname(),
-                                c => $acp->location()->name(),
-                                j => $acp->call_number()->label(),
-                                ($acp->circ_modifier() ? (g => $acp->circ_modifier()) : ()),
-                                p => $acp->barcode(),
-                                ($price ? (y => $price) : ()),
+                                b => Encode::decode_utf8($acp->call_number()->owning_lib()->shortname()),
+                                b => Encode::decode_utf8($acp->circ_lib()->shortname()),
+                                c => Encode::decode_utf8($acp->location()->name()),
+                                j => Encode::decode_utf8($acp->call_number()->label()),
+                                ($acp->circ_modifier() ? (g => Encode::decode_utf8($acp->circ_modifier())) : ()),
+                                p => Encode::decode_utf8($acp->barcode()),
+                                ($price ? (y => Encode::decode_utf8($price)) : ()),
                                 ($acp->copy_number() ? (t => $acp->copy_number()) : ()),
                                 ($U->is_true($acp->ref()) ? (x => 'reference') : ()),
                                 (!$U->is_true($acp->holdable()) ? (x => 'unholdable') : ()),

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

Summary of changes:
 Open-ILS/src/support-scripts/marc_export.in |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list