[python-ldap] Bind with non-ascii DN

Michael Ströder michael at stroeder.com
Mon Jul 1 23:08:41 CEST 2013


Cornelius Kölbel wrote:
> I have DNs with unsafe characters and other non-ascii characters.
> Is it possible to do the bin with the base64 encoded DN?

LDAPv3 defines UTF-8 based string encoding for DNs in RFC 4514 and python-ldap
happily sends that to the server.
Note that you have to do the s.decode('utf-8') in your code which calls
python-ldap functions/methods.

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20130701/afc559d0/attachment.bin>


More information about the python-ldap mailing list