I am creating alternative OPACs for a Koha site using the SetEnv techniques. When I set this in the Apache config: RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName Slægtsforskernes Bibliotek" there is a problem with the encoding, the name is displayed like this: Slægtsforskernes Bibliotek If I try to replace the "æ" with æ, that text is displayed as is, and not replaced by the proper letter: Slægtsforskernes Bibliotek Anyone got a clue how to fix this?
Created attachment 119221 [details] [review] Bug 28094: Deal with encoding for overriden sysprefs The string we retrieved is UTF-8 encoded, to prevent encoding issue we must decode it first. Test plan: Easily testable with LibraryName: 1. edit /etc/apache2/sites-available/kohadev.conf 2. Add RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName Library of ❤️" 3. restart_all 4. Hit the mainpage and look at the source (or title) and confirm that the string is displayed correcty
Created attachment 119245 [details] [review] Bug 28094: Deal with encoding for overriden sysprefs The string we retrieved is UTF-8 encoded, to prevent encoding issue we must decode it first. Test plan: Easily testable with LibraryName: 1. edit /etc/apache2/sites-available/kohadev.conf 2. Add RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName Library of ❤️" 3. restart_all 4. Hit the mainpage and look at the source (or title) and confirm that the string is displayed correcty Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 119369 [details] [review] Bug 28094: Deal with encoding for overriden sysprefs The string we retrieved is UTF-8 encoded, to prevent encoding issue we must decode it first. Test plan: Easily testable with LibraryName: 1. edit /etc/apache2/sites-available/kohadev.conf 2. Add RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName Library of ❤️" 3. restart_all 4. Hit the mainpage and look at the source (or title) and confirm that the string is displayed correcty Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Pushed to master for 21.05, thanks to everybody involved!
Wow, thanks for fixing this so quickley!
Pushed to 20.11.x for 20.11.05
Pushed to 20.05.x for 20.05.11
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.