[GIT] Evergreen ILS branch rel_3_13 updated. c90e011eb2cf6cec58625a800d79ba07ac2fca4b

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_3_13 has been updated via c90e011eb2cf6cec58625a800d79ba07ac2fca4b (commit) from 87d7b6c85a97ad5164e8839127ff0ad4860804b2 (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 c90e011eb2cf6cec58625a800d79ba07ac2fca4b Author: Jason Stephenson <jason@sigio.com> Date: Thu Mar 20 10:13:35 2025 -0400 LP#2103714: Do not decode item fields in marc_export This commit removes the call to Encode::decode_utf8 on item fields in marc_export. It turns out that decoding them produces gibberish in the output for some multibyte sequences. To reproduce the bug/test the fix: Find a record with a diacritic in the call number, call number prefix, or call number suffix. Export it via marc_export with the --items option and format XML: echo <record id> | marc_export --pipe --items -f XML > output.xml Examine the file with your favorite UTF-8 editor and note that the diacritic character in the call number is very like wrong or has the unknown character glyph. After applying the patch, repeat the above steps and the character should appear as expected. NB: You cannot currently test this bug in concerto without editing a call number to add a Unicode charater, "ê" should work. Release-note: Fix handling of diacritics in marc_export items export. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Llewellyn Marshall <llewellyn.marshall@dncr.nc.gov> Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> diff --git a/Open-ILS/src/support-scripts/marc_export.in b/Open-ILS/src/support-scripts/marc_export.in index 23cbd40a1d..399a0b3d0b 100755 --- a/Open-ILS/src/support-scripts/marc_export.in +++ b/Open-ILS/src/support-scripts/marc_export.in @@ -22,7 +22,6 @@ 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'); @@ -726,16 +725,16 @@ sub next { my $f852b_option = $Marque::config->option_value('852b'); if ($f852b_option eq 'owning_lib') { @sfb = ( - b => Encode::decode_utf8($acp->call_number()->owning_lib()->shortname()), + b => $acp->call_number()->owning_lib()->shortname(), ); } elsif ($f852b_option eq 'circ_lib') { @sfb = ( - b => Encode::decode_utf8($acp->circ_lib()->shortname()), + b => $acp->circ_lib()->shortname(), ); } else { @sfb = ( - b => Encode::decode_utf8($acp->call_number()->owning_lib()->shortname()), - b => Encode::decode_utf8($acp->circ_lib()->shortname()), + b => $acp->call_number()->owning_lib()->shortname(), + b => $acp->circ_lib()->shortname(), ); } @@ -746,14 +745,14 @@ sub next { '852', '4', ' ', ($location ? ('a' => $location) : ()), @sfb, - c => Encode::decode_utf8($acp->location()->name()), - ($prefix ? (k => Encode::decode_utf8($prefix)) : ()), - j => Encode::decode_utf8($acp->call_number()->label()), - ($suffix ? (m => Encode::decode_utf8($suffix)) : ()), - ($acp->circ_modifier() ? (g => Encode::decode_utf8($acp->circ_modifier())) : ()), - p => Encode::decode_utf8($acp->barcode()), - s => Encode::decode_utf8($status), - ($price ? (y => Encode::decode_utf8($price)) : ()), + c => $acp->location()->name(), + ($prefix ? (k => $prefix) : ()), + j => $acp->call_number()->label(), + ($suffix ? (m => $suffix) : ()), + ($acp->circ_modifier() ? (g => $acp->circ_modifier()) : ()), + p => $acp->barcode(), + s => $status, + ($price ? (y => $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 | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) hooks/post-receive -- Evergreen ILS
participants (1)
-
Git User