You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of ldapply ignores the charset when reading the .ldif file but then tries to send the data to the LDAP server, it encodes the data to the encoding of the current locale as if the data was encoded in ISO-8859-1.
This means:
If there are just ASCII codepoints and no non-ASCII UTF-8 codepoints, everything is fine. Hence, "foo" stays "foo".
If the current locale is "C" (e.g. export LANG=), UTF-8 non ASCII codepoints get silently replaced by empty strings. Hence, "Iñtërnâtiônàlizætiøn" is mutilated into "Itrntinliztin".
If the current locale is "en_US.UTF-8" (e.g. export LANG=en_US.UTF-8), UTF-8 non ASCII codepoints get silently re-encoded into UTF-8. Hence, "Iñtërnâtiônàlizætiøn" is mutilated into "Iñtërnâtiônà lizætiøn".
If the current locale is "en_US.ISO-8859-1" (e.g. export LANG=en_US.ISO-8859-1), UTF-8 non ASCII codepoints get transparently re-encoded (as if they were not re-encoded at all). Hence, "Iñtërnâtiônàlizætiøn" stays "Iñtërnâtiônàlizætiøn".
Thus, oddly enough, only when the locale is a non UTF-8 locale, UTF-8 handling gets done correctly (albeit accidentally). It is expected that the action of ldapply be independent of the locale, of it is were locale dependent, then the locale would influence how the local .ldif file would be interpreted, not how to encode for the remote server.
The text was updated successfully, but these errors were encountered:
The current version of
ldapply
ignores the charset when reading the.ldif
file but then tries to send the data to the LDAP server, it encodes the data to the encoding of the current locale as if the data was encoded in ISO-8859-1.This means:
export LANG=
), UTF-8 non ASCII codepoints get silently replaced by empty strings. Hence, "Iñtërnâtiônàlizætiøn" is mutilated into "Itrntinliztin".export LANG=en_US.UTF-8
), UTF-8 non ASCII codepoints get silently re-encoded into UTF-8. Hence, "Iñtërnâtiônàlizætiøn" is mutilated into "Iñtërnâtiônà lizætiøn".export LANG=en_US.ISO-8859-1
), UTF-8 non ASCII codepoints get transparently re-encoded (as if they were not re-encoded at all). Hence, "Iñtërnâtiônàlizætiøn" stays "Iñtërnâtiônàlizætiøn".Thus, oddly enough, only when the locale is a non UTF-8 locale, UTF-8 handling gets done correctly (albeit accidentally). It is expected that the action of
ldapply
be independent of the locale, of it is were locale dependent, then the locale would influence how the local.ldif
file would be interpreted, not how to encode for the remote server.The text was updated successfully, but these errors were encountered: