Bug #4381
closed
Special characters (ie, accents such as éèùô) are replaced by "?" in CFEngine promises
Added by Jonathan CLARKE almost 11 years ago.
Updated over 10 years ago.
Category:
Web - Config management
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.
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
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?
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.
Ok, the right solution is to set this property in /etc/default/jetty
-Dfile.encoding=UTF-8
for Java
- Status changed from 8 to Pending technical review
- Assignee set to Nicolas CHARLES
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset packages:commit:c2331d472c2e687e57b6953df1724c33cc4b7735.
Applied in changeset packages:commit:678491630d69f9509d4d324782325d5b32ecdbe9.
- Target version changed from 2.6.10 to 2.6.11
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.6.11, which was released today.
Check out:
Also available in: Atom
PDF