UTF-8 and LDAP

Andrew Bartlett abartlet at pcug.org.au
Thu Feb 28 02:54:03 GMT 2002

Juergen Hasch wrote:
> Am Samstag, 23. Februar 2002 19:54 schrieb Juergen Hasch:
> > Hi Andrew,
> > 2. Convert some strings to/from UTF-8 when calling LDAP functions.
> >    I assume here that not all parameters need to be in UTF-8.
> >    Namely in ldap_search only the filter expression needs to be UTF-8,
> >    base and attributes should not contain non-ascii chars.
> >    Received strings from LDAP get UTF-8 converted in ads_pull_string
> >    and ads_dump_string.
> >    For ldap_modify_ext_s I needed to allocate space for the strings after
> >    UTF-8 conversion using talloc_strdup in ads_mod_ber / ads_mod_var.
> >
> Unfortunately there was a typo in the patch for ldap.c. I also had a small
> fight with my text editor eating whitespaces at the end of the line.
> Here comes the fixed version. I also UTF-8-converted the base parameter in
> ldap_search_ext_s, as I found a case where german characters are used ;-)

This looks fine (and I might just apply it anyway), but I've still got
issues from your previous patch.  See build.samba.org if you can't
reproduce it locally, but whenever I run command line tools that
charset_initialise(), I get errors about being unable to convert between
various charsets - the new UTF-8 being mentaioned in all the cases.

Can you have a look at it for me? 

Andrew Bartlett

Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net

More information about the samba-technical mailing list