Bugzilla – Attachment 125617 Details for
Bug 27526
Remove Mod/AddItemFromMarc from additem.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27526: Fix encoding issue on subfield
Bug-27526-Fix-encoding-issue-on-subfield.patch (text/plain), 1.82 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-10-01 11:33:53 UTC
(
hide
)
Description:
Bug 27526: Fix encoding issue on subfield
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-10-01 11:33:53 UTC
Size:
1.82 KB
patch
obsolete
>From fcdc98189e22c412f8725e4fdc79ecf96ee18a34 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 21 Jul 2021 11:24:27 +0200 >Subject: [PATCH] Bug 27526: Fix encoding issue on subfield >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >If you have a "é" subfield it should work! > >Note that VARCHAR(1) for binary means 1-byte (from MySQL doc): >"For example, if the default character set is utf8mb4, CHAR(5) BINARY is >treated as CHAR(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin. This >differs from BINARY(5), which stores 5-byte binary strings that have the >binary character set and collation." > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > cataloguing/additem.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index e2c6e67b46..f5b57d2489 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -51,6 +51,7 @@ use C4::Members; > > use MARC::File::XML; > use URI::Escape qw( uri_escape_utf8 ); >+use Encode qw( encode_utf8 ); > use MIME::Base64 qw( decode_base64url encode_base64url ); > use List::Util qw( first ); > use List::MoreUtils qw( any uniq ); >@@ -693,7 +694,7 @@ if ($op eq "additem") { > my @more_subfields_xml = $input->multi_param("items.more_subfields_xml"); > my @unlinked_item_subfields; > for my $subfield ( uniq @more_subfields_xml ) { >- my @v = $input->multi_param('items.more_subfields_xml_' . $subfield); >+ my @v = $input->multi_param('items.more_subfields_xml_' . encode_utf8($subfield)); > push @unlinked_item_subfields, $subfield, $_ for @v; > } > if ( @unlinked_item_subfields ) { >-- >2.32.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27526
:
115679
|
115680
|
116006
|
117806
|
117807
|
117808
|
121589
|
121590
|
121591
|
122288
|
122318
|
122655
|
122656
|
122657
|
122658
|
122676
|
122677
|
122681
|
122682
|
122694
|
122695
|
122696
|
122946
|
122947
|
122948
|
122949
|
122950
|
122951
|
122952
|
122953
|
122954
|
122957
|
122958
|
122959
|
122974
|
123006
|
123007
|
123110
|
123329
|
123372
|
123415
|
123757
|
123758
|
123759
|
123760
|
123761
|
123762
|
123763
|
123764
|
123765
|
123766
|
123767
|
123768
|
123769
|
123770
|
123771
|
123772
|
125069
|
125605
|
125606
|
125607
|
125608
|
125609
|
125610
|
125611
|
125612
|
125613
|
125614
|
125615
|
125616
| 125617 |
125618
|
125619
|
125620
|
125818
|
125839
|
125863
|
126034
|
126051
|
126143
|
126144
|
126393
|
127025
|
127032