
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_14 has been updated via ffb1c9b5693c41dfa927869d8631f6da4f1a2074 (commit) from 148c9782ba073c322b01bae9dd22f9429cd9f042 (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 ffb1c9b5693c41dfa927869d8631f6da4f1a2074 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 727b28a105..57b290f24f 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'); @@ -728,16 +727,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(), ); } @@ -748,14 +747,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