LDAP and UTF-8

Andrew Bartlett abartlet at pcug.org.au
Sun Feb 17 13:27:02 GMT 2002

Juergen Hasch wrote:
> Hi,
> I am using the NET ADS USER command in Samba head to list the users stored
> in a Win2K ADS. Some user names contain non-english characters encoded in UTF-8
> format which don't get displayed correctly. Winbindd has the same problems.
> I added the some UTF-8 helper functions to lib/chrcnv.c to be able to convert
> UTF-8 to unix.
> Would someone comment on
> a) is there another (better) way to convert from UTF-8 to Unix than
> using convert_string(...) and adding the pull_ and push_ wrapper functions ?

This looks like the right way to do it.  If I understand correctly, the
UTF8->UTF8 case should be a no-op and thetas the most common situation. 
(Unix is normally set to utf8).

> b) what is the difference between CH_UNIX and CH_DISPLAY, when should I
> convert to CH_DISPLAY instead of CH_UNIX ?

CH_DISPLAY is designed for our user interactive utilities and swat. 
This is because the 'unix' encoding (often HEX for Japanese) isn't
suitable for humans to read.

> c) are there platforms without iconv, so this will possibly break things ?

We have our own iconv for the common case - but if you don't have iconv
you lose internationalization support.

So you would use this new code to go from 'utf8->unix' in winbind, and
'utf8->display' in ads user.

While I have been paying attention (and am willing to apply this patch)
somebody more involved with the internationalization stuff may wish to

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