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. If you try to add non latin characters in a pref like OPACMySummaryNote or NoLoginInstructions, the display is broken.
Created attachment 28824 [details] [review] Bug 12411: Preferences values should be utf8 encoded Test plan: Fill OPACMySummaryNote or NoLoginInstructions with something like "éàç" and verify the display is broken.
On master 3.17.00.007, without applying 12411 [and without applying 11944] the display is not broken.
Which sysprefs did you test?
(In reply to Jonathan Druart from comment #3) > Which sysprefs did you test? I've tested OPACMySummaryNote and NoLoginInstructions
Without this patch, I filled "NoLoginInstructions" with "Hello éàç". Go on opac-user.pl and I see "Hello ���" Template 'en' and bootstrap theme.
(In reply to Jonathan Druart from comment #5) > Without this patch, I filled "NoLoginInstructions" with "Hello éàç". Go on > opac-user.pl and I see "Hello ���" > > Template 'en' and bootstrap theme. Today I've made some tests on master 3.17.00.008 without applying the patch. The cases I made were on both the two prefs. With the string "Something éàç", the behaviour of master was the one you said. I see: Something ��� On the contrary, with the string "Μαρωνίτης 実 éàç" I see no strange char. I see: Μαρωνίτης 実 éàç -------------------------------------------------------------------- éàç are all in [128:255], whilest the other chars are [256:+). -------------------------------------------------------------------- Afterwards I've applied the patch. Both the two cases were OK. So I've passed the patch to "Signed Off" status.
Created attachment 29058 [details] [review] Bug 12411: Preferences values should be utf8 encoded
Created attachment 29112 [details] Bug 12411 - Encoding broken in the syspref template plugin
Created attachment 29113 [details] [review] Bug 12411 - Encoding broken in the syspref template plugin
This patch should not be pushed to master (unless bug 11944 is not pushed until the 3.18 release). I cc Galen and Fridolin, RM for 3.16 and 3.14.
Patch pushed to master. Thanks Jonathan!
(In reply to Jonathan Druart from comment #0) > 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. > > If you try to add non latin characters in a pref like OPACMySummaryNote or > NoLoginInstructions, the display is broken. (In reply to Jonathan Druart from comment #10) > This patch should not be pushed to master (unless bug 11944 is not pushed > until the 3.18 release). > I cc Galen and Fridolin, RM for 3.16 and 3.14. Pushed to 3.16.x, will be in 3.16.13 Fridolin, you might want to add this to 3.14.x?
Pushed to 3.16.x, will be in 3.16.13