Bug #4381
closedSpecial characters (ie, accents such as éèùô) are replaced by "?" in CFEngine promises
Description
If special characters (such as accents, like é) are entered into a Directive variable, the special characters are replaced by "?".
I entered "Ceci est un mot accentué (héhéhé !)", after making sure my browser was in UTF-8. This came out in promises as "Ceci est un mot accentu? (h?h?h? !)"
I checked LDAP content and it has the right accents:
directiveVariable:: R0VORVJJQ19GSUxFX0NPTlRFTlRfUEFZTE9BRFswXTpDZWNpIGVzdCB1bi Btb3QgYWNjZW50dcOpIChow6low6low6kgISk= # echo "R0VORVJJQ19GSUxFX0NPTlRFTlRfUEFZTE9BRFswXTpDZWNpIGVzdCB1bi > Btb3QgYWNjZW50dcOpIChow6low6low6kgISk=" | openssl base64 -d GENERIC_FILE_CONTENT_PAYLOAD[0]:Ceci est un mot accentué (héhéhé !)
I saw this on 2.9.2 but I'm assuming it also happens since older versions.
Updated by Nicolas CHARLES almost 11 years ago
on my dev system, it works out well
Could it be a local problem on the system ? I remember that the local is kinda defined in Jetty
Updated by Jonathan CLARKE almost 11 years ago
Nicolas CHARLES wrote:
on my dev system, it works out well
Could it be a local problem on the system ? I remember that the local is kinda defined in Jetty
I have no idea. If you don't see it on your dev system, then please reproduce it on a standard installation. I saw this using a simple rudder-snapshot installation.
What we need to know is which component is introducing the "?". I tried to figure this out, but I can only get as far as "it's OK in LDAP", so now I can't analyze this any further, since the next step is in Scala code. Can you continue that analysis please?
Updated by Nicolas CHARLES almost 11 years ago
Tried on rudder-snapshot
The locale defined in /etc/jetty is export LANG=C
In logs and generated promises, héhéhé becomes h?h?h?
Changing in /etc/jetty to
export LANG=en_US.UTF-8
correct both the logs and the generated promises.
Updated by Nicolas CHARLES almost 11 years ago
Ok, the right solution is to set this property in /etc/default/jetty
-Dfile.encoding=UTF-8
for Java
Updated by Jonathan CLARKE almost 11 years ago
- Status changed from 8 to Pending technical review
- Assignee set to Nicolas CHARLES
Thanks for investigating Nicolas! I "pull requested" your solution: https://github.com/Normation/rudder-packages/pull/210. Please review.
Updated by Jonathan CLARKE almost 11 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset packages:commit:c2331d472c2e687e57b6953df1724c33cc4b7735.
Updated by Nicolas CHARLES almost 11 years ago
Applied in changeset packages:commit:678491630d69f9509d4d324782325d5b32ecdbe9.
Updated by Vincent MEMBRÉ almost 11 years ago
- Target version changed from 2.6.10 to 2.6.11
Updated by Vincent MEMBRÉ over 10 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.6.11, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2014-March/000077.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog26
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/