Bug 28489: Don't deal with encoding during the serialization

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-06-05 15:27:02 +02:00
parent 1887f3b53f
commit a502ae7b68
1 changed files with 2 additions and 3 deletions

View File

@ -9,19 +9,18 @@ $INC{'CGI/Session/Serialize/yamlxs.pm'} = '1';
use CGI::Session::ErrorHandler;
use YAML::XS ();
use Encode ();
$CGI::Session::Serialize::yamlxs::VERSION = '0.1';
@CGI::Session::Serialize::yamlxs::ISA = ( "CGI::Session::ErrorHandler" );
sub freeze {
my ($self, $data) = @_;
return Encode::decode_utf8(YAML::XS::Dump($data));
return YAML::XS::Dump($data);
}
sub thaw {
my ($self, $string) = @_;
return (YAML::XS::Load(Encode::encode_utf8($string)))[0];
return (YAML::XS::Load($string))[0];
}
# ********************************************************************