Bug 19756 - Encoding issues when update DB is run from the interface
Summary: Encoding issues when update DB is run from the interface
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Jonathan Druart
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on: 13793
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-06 11:41 UTC by Marc Véron
Modified: 2019-10-14 19:55 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Strange message while upgrading to 17.12.00.000 (20.71 KB, image/png)
2017-12-06 11:41 UTC, Marc Véron
Details
Bug 19756: Fix encoding issues during the update DB process (1.76 KB, patch)
2017-12-20 22:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19756: Fix encoding issues during the update DB process (1.80 KB, patch)
2017-12-21 00:14 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 19756: Fix encoding issues during the update DB process (1.85 KB, patch)
2017-12-21 14:53 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2017-12-06 11:41:34 UTC
Created attachment 69552 [details]
Strange message while upgrading to 17.12.00.000

Upgrading to current master (17.12.00.0000) displays a strange message (seems to be encoding problem).
See screenshot from Firefox ESR 45.3.0
Comment 1 Liz Rea 2017-12-13 02:59:32 UTC
That will be some problem encoding the macrons in the update text.
Comment 2 Jonathan Druart 2017-12-20 21:59:23 UTC
(I am not sure about that I guess this has been added by bug 13793)
Comment 3 Jonathan Druart 2017-12-20 22:03:12 UTC
Created attachment 69980 [details] [review]
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Ä tÅia, tÄ haumatia)
=> With this patch applied you will see :
Upgrade to 17.12.00.000 done (Tē tōia, tē haumatia)
Comment 4 Liz Rea 2017-12-21 00:14:43 UTC
Created attachment 69983 [details] [review]
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Ä tÅia, tÄ 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>
Comment 5 Kyle M Hall 2017-12-21 14:53:04 UTC
Created attachment 70040 [details] [review]
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Ä tÅia, tÄ 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>
Comment 6 Jonathan Druart 2017-12-21 16:24:54 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2018-01-15 16:42:46 UTC
Awesome work all, pushed to stable for 17.11.02
Comment 8 Fridolin Somers 2018-01-19 09:06:14 UTC
Pushed to 17.05.x for v17.05.08