Fix UTF-8 encoding/decoding
Creating a global issue for all encoding bugs we intent to fix in 3.0 :
In order to fully solve this issue, and the one affecting the other backends, I think LLNG should decode() UTF-8 values received by PSGI into proper Unicode strings, and encode() them before sending the response, this seems to be how PSGI is supposed to work:
But there are many places in the code where this will have to be done for it to have a globally positive impact on encoding issues. As long as it's not done everywhere, it will only appear to break things
We need to handle properly encoded (UTF-8 data + UTF-8 perl flag) UTF-8 strings in all LLNG methods, and only convert them to latin-1 when doing the PSGI render. Most modules (LDAP/DBI/JSON..) behave correctly when handed correct UTF-8 strings
This require a lot of refactoring and will break compatibility with saved conf/sessions. A migration step will be required when migrating to 3.0