I have an issue with an ldap entry. I try to create a dn such as :
dn: ou=élèves,ou=1A,ou=Classes,ou=Personnes,dc=ldap,dc=ecoleplurielle,dc=local
as I have utf-8 characters in ou=élèves
I translate this value in base-64 and add an extra colon after the dn, which gives me :
dn::b3U9w6lsw6h2ZXMsb3U9MlNBLG91PUNsYXNzZXMsb3U9UGVyc29ubmVzLGRjPWxkYXAsZGM9ZWNvbGVwbHVyaWVsbGUsZGM9bG9jYWw=
The thing is when I use ldapadd
with this entry, the command seems to auto generate comments and in this autogenerated comment, utf-8 characters a wrongly represented.
Let's see in details:
My ldapsearch result gives me this. You can see that the third comment starts by \C3\A9
and \C3\A8
which are hex values for utf-8 letters é
and è
.
On this image you can see the ldif used to populate ldap.
The weird thing is I do not write comments in the ldif file. The buggy line seems to appear on its own. You'd say it doesn't matter as it's just a comment but it makes phpLDAPadmin crash...
I already tried to convert the ldif in utf-8 using iconv.
Do someone know how to prevent this comment from being generated? Is there something I miss here?