UTF-8 and LDAP

Andrew Bartlett abartlet at pcug.org.au
Thu Feb 28 17:19: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 ;-)

Can you look at doing these without using fstrings all over the place? 
We are trying (slowly, painfully) to move to allocated buffers.  We have
some 'convert and allocate' functions that might do what you want - or
you could add a convert and talloc() version if that makes it easier.

Thanks,

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