non-ascii handling

Jens Vagelpohl jens at zope.com
Mon Apr 8 21:44:09 CEST 2002


i have a product that uses python-ldap and i'm trying to make sure 
everything works when non-ascii characters are used in a DN. from what i 
have been reading about OpenLDAP it either wants pure ASCII passed to it 
(for search terms, DNs etc) or UTF-8-encoded unicode strings.

my question is: does python-ldap do any automatic string conversions? i 
get search results just fine using a non-ascii search term when i do not 
convert the term myself and hand it to ldap.search_s, but i never get 
results if i convert the string by myself and then hand it to the search_s 
method.

i'm trying to find out whether i am doing the wrong thing converting any 
and all non-ascii myself in my product before sending it over the line to 
the LDAP server using python-ldap.

jens





More information about the python-ldap mailing list