The conversion of the metadata into Base64 for passing in the API call
to the plugin API routes was failing if the metadata contained a wide
character, so we now encode it into UTF-8 first
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@tudublin.ie>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
use JSON;
use MIME::Base64 qw( encode_base64 );
-use URI::Escape qw ( uri_escape );
+use URI::Escape qw( uri_escape );
+use Encode qw( encode );
use Koha::Plugins;
# so this function returns something predictable that we can test!
my $json = JSON->new;
$json->canonical([1]);
- return uri_escape(encode_base64($json->encode($metadata)));
+ return uri_escape(encode_base64(encode('utf-8',$json->encode($metadata))));
}
=head1 AUTHOR