Bug 19756: Fix encoding issues during the update DB process
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 20 Dec 2017 21:59:39 +0000 (18:59 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 15 Jan 2018 13:56:27 +0000 (13:56 +0000)
commite52486eeba13987c926ecf0c952644e5bacdc2b0
tree5897050173f93999a918f40bcdd9339d57d13ca7
parentf4c1712f58b8e90704893fb501c5cfc9d12f02a2
Bug 19756: Fix encoding issues during the update DB process

To display the output of the updatedatabase.pl under Plack, we redirect
the output to a temporary file, read it, then display it.
We need to open it specifying the correct encoding (utf-8).

Test plan:
1. MariaDB [koha_kohadev]> update systempreferences set value="17.1100000"
where variable="version";
2. restart plack
3. Login
4. Make the update from the interface
=> Without this patch you will see encoding issue:
Upgrade to 17.12.00.000 done (TÄ\93 tÅ\8dia, tÄ\93 haumatia)
=> With this patch applied you will see :
Upgrade to 17.12.00.000 done (Tē tōia, tē haumatia)

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
installer/install.pl