Hello,
I can't use ldapmodrdn command when some attributes like givenname contains accented characters, the error is "Rename result: Invalid DN syntax(34)
My configuration is a server with Linux centos 7 and Openldap 2.4.35
The client is a windows XP where i copy the binarie ldapmodrdn.exe from openldap for windows 2.4.32
When i launch this command for example on linux server it is ok but on the xp client it doesn't work :
ldapmodrdn -h xx.xx.xx.xx:389 -D cn=admin,c=fr -w yyyyyy -s "ou=TEST,c=FR" "cn=TEST Véronique,ou=TEST2,c=FR" "cn=Myname Véronique"
I think the problem is with the executable ldapmodrdn.exe. Where can i find an equivalent version of the linux version that can works on windows ? Have you an idea to solve the problem ?
Thanks
LAROCHETTE Philippe wrote:
I can't use ldapmodrdn command when some attributes like givenname contains accented characters, the error is "Rename result: Invalid DN syntax(34)
My configuration is a server with Linux centos 7 and Openldap 2.4.35
The client is a windows XP where i copy the binarie ldapmodrdn.exe from openldap for windows 2.4.32
When i launch this command for example on linux server it is ok but on the xp client it doesn't work :
ldapmodrdn -h xx.xx.xx.xx:389 -D cn=admin,c=fr -w yyyyyy -s "ou=TEST,c=FR" "cn=TEST Véronique,ou=TEST2,c=FR" "cn=Myname Véronique"
I think the problem is with the executable ldapmodrdn.exe. Where can i find an equivalent version of the linux version that can works on windows ? Have you an idea to solve the problem ?
Attribute 'cn' is of DirectoryString syntax (Unicode in UTF-8 encoding).
I'd rather guess that some funky command-line charset is used on Windows.
You could try the hex-escaped UTF-8 encoding (see RFC 4514) on Windows command-line which is not really convenient of course.
Ciao, Michael.
Thank you for your answer
In fact, it's working fine if i replace the "é" character with this sequence "\c3\a9"
To complete for finding à more simple solution :
1 - I precise that i use a normal command-line charset like chcp 1250 or chcp 850 with the Lucidia Font in the windows console that show correctly the accented characters in the windows command 2 - When i use ldapadd or ldapmodifiy, i have no problem with the accentes characters... but for this command i copy the .exe binaries from the OID 11g of oracle windows client... but in this product for windows there is not à ldapmodrdn.exe program...
thanks for your help
-----Message d'origine----- De : Michael Ströder [mailto:michael@stroeder.com] Envoyé : mardi 8 septembre 2015 CG Nord 00:00 À : LAROCHETTE Philippe; openldap-technical@openldap.org Objet : Re: ldapmodrdn accented characters with windows client
LAROCHETTE Philippe wrote:
I can't use ldapmodrdn command when some attributes like givenname contains accented characters, the error is "Rename result: Invalid DN syntax(34)
My configuration is a server with Linux centos 7 and Openldap 2.4.35
The client is a windows XP where i copy the binarie ldapmodrdn.exe from openldap for windows 2.4.32
When i launch this command for example on linux server it is ok but on the xp client it doesn't work :
ldapmodrdn -h xx.xx.xx.xx:389 -D cn=admin,c=fr -w yyyyyy -s "ou=TEST,c=FR" "cn=TEST Véronique,ou=TEST2,c=FR" "cn=Myname Véronique"
I think the problem is with the executable ldapmodrdn.exe. Where can i find an equivalent version of the linux version that can works on windows ? Have you an idea to solve the problem ?
Attribute 'cn' is of DirectoryString syntax (Unicode in UTF-8 encoding).
I'd rather guess that some funky command-line charset is used on Windows.
You could try the hex-escaped UTF-8 encoding (see RFC 4514) on Windows command-line which is not really convenient of course.
Ciao, Michael.
On Tue, Sep 08, 2015 at 04:06:42PM +0200, LAROCHETTE Philippe wrote:
In fact, it's working fine if i replace the "é" character with this sequence "\c3\a9"
OK - so it works if you feed it UTF-8. This is expected, as LDAP expects every text string to use the UTF-8 encoding and the standard version of the command-line tools does not do any character-set conversion.
1 - I precise that i use a normal command-line charset like chcp 1250 or chcp 850 with the Lucidia Font in the windows console that show correctly the accented characters in the windows command
Can you change the working locale of the system to use UTF-8 ? If you are really using Windows XP this may be hard, but it is really time to get rid of that obsolete OS anyway.
Can you move the client application to a Linux platform? Most modern distros default to UTF-8 which makes this easy.
2 - When i use ldapadd or ldapmodifiy, i have no problem with the accentes characters... but for this command i copy the .exe binaries from the OID 11g of oracle windows client... but in this product for windows there is not à ldapmodrdn.exe program...
In those cases the accents may be in data files in UTF-8 of course. It also sounds as if you are getting ldapmodify from a different set of binaries so maybe one set has charset conversion and the other does not.
If you really have to keep the XP system you might be able to build a workaround using something like iconv to process the command-line args and input files:
iconv --from-code=CP1250 --to-code=UTF-8 /path/to/inputfile
Andrew
openldap-technical@openldap.org