]> git.koha-community.org Git - koha.git/commit
Bug 28281: Remove double decoding when importing installation data
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Wed, 5 May 2021 09:12:44 +0000 (12:12 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 7 May 2021 12:44:00 +0000 (14:44 +0200)
commite2810dc2aa1e5095197ff102f6af3e1930e33379
treeb85d5c5919753565dca54e0b0b94f19fbd7fa254
parent1426cfce0e63409f7130fe9e7d510c90c11a356c
Bug 28281: Remove double decoding when importing installation data

The YAML::XS::Load and YAML::XS::LoadFile functions already decode the
YAML to Perl objects/strings, therefore decoding the output yet
another time is not needed and causes an error to happen.

To test:

1. Go through the following steps and notice without this patch the
error happens and with this patch it doesn't:

$ koha-mysql kohadev < installer/data/mysql/kohastructure.sql
$ restart_all
$ ./translate update pl-PL
$ ./translate install pl-PL
$ restart_all
 --> Go to the Koha web installer page and select pl-PL as the installer
 language, click through it and notice it gives following error at the
 MARC21 step:

 Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.24/Encode.pm line 202

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Installer.pm