This bug is related to #12411 and #11944, since then pushed to master. Whatever we enter with accents in NoLoginInstructions is displayed as gibberish because it ends up being encoded TWICE. It was not doing that before. My solution is to modify Koha::Template::Plugin::Koha::Preference. It might be naive and missing all the changes done in aforementionned bugs, but this does fix my immediate issue in 3.20 and master.
Created attachment 41113 [details] [review] Bug 14584 - Encoding broken with system preferences This prevents double-encoding the strings from the database's systempreferences. STEP 1) You need an accentuated language installed. 2) Go to NoLoginInstructions pref, and add some accentuated message like "Hélo médames é mècieüx" 3) refresh opac home page, message should be gibberish 4) apply patch. Message should be ok now.
Actually I would say that the line could only be replaced with a call to C4::Context->preference.
Well, I'm fine with that, but isn't it just making this function useless? I think what you're suggesting is what it was before the latest change. I just presumed there had been a need for that "encode('UTF-8'" call...
(In reply to Blou from comment #3) > Well, I'm fine with that, but isn't it just making this function useless? I > think what you're suggesting is what it was before the latest change. I > just presumed there had been a need for that "encode('UTF-8'" call... Not useless, it can be called from the templates. Back 1 year ago, from bug 12411: "This will fix the encoding issues existing in 3.14 and 3.16. The issue still appear in master but is fixed by bug 11944." So bug 12411 should not have been pushed to master or 11944 should have reverted the changes.
Created attachment 41632 [details] [review] Bug 14584: Encoding broken with system preferences The pref are double encoded. From bug 12411: "This will fix the encoding issues existing in 3.14 and 3.16. The issue still appear in master but is fixed by bug 11944." They should not have been pushed together. Test plan: 1) You need an accentuated language installed. 2) Go to NoLoginInstructions pref, and add some accentuated message like "Hélo médames é mècieüx" 3) refresh opac home page, message should be gibberish 4) apply patch. Message should be ok now.
Should be backported to 3.20, not 3.18!
Created attachment 41641 [details] [review] [SIGNED OFF] Bug 14584: Encoding broken with system preferences The pref are double encoded. From bug 12411: "This will fix the encoding issues existing in 3.14 and 3.16. The issue still appear in master but is fixed by bug 11944." They should not have been pushed together. Test plan: 1) You need an accentuated language installed. 2) Go to NoLoginInstructions pref, and add some accentuated message like "Hélo médames é mècieüx" 3) refresh opac home page, message should be gibberish 4) apply patch. Message should be ok now. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Works as expected.
Created attachment 42183 [details] [review] [PASSED QA] Bug 14584: Encoding broken with system preferences The pref are double encoded. From bug 12411: "This will fix the encoding issues existing in 3.14 and 3.16. The issue still appear in master but is fixed by bug 11944." They should not have been pushed together. Test plan: 1) You need an accentuated language installed. 2) Go to NoLoginInstructions pref, and add some accentuated message like "Hélo médames é mècieüx" 3) refresh opac home page, message should be gibberish 4) apply patch. Message should be ok now. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Works as expected. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patch pushed to master. Thanks Jonathan!
Pushed to 3.20.x will be in 3.20.4
(In reply to Jonathan Druart from comment #6) > Should be backported to 3.20, not 3.18! Seems to have been pushed in 3.18.11 despite Jonathan's comment