[Date Prev][Date Next] [Chronological] [Thread] [Top]

UTF-8 support for libldap


A few weeks ago I took the Umich 3.3 ldap and added translation between
ISO-8859-1 and UTF-8.  This way, any client using libldap can support
national characters in a natural way that is interoperable with Netscape
Communicator and, presumably, LDAP v3.

This support is implemented as a compile-time option that replaces the
T61 routines by UTF-8 versions.

However, I feel unsure about this patch, I am not completely convinced
that this is the right approach.

On the one hand, any LDAP client needs to do something about this and
doing it in the library fixes the problem for every one of them.  On the
other hand, I don't understand the code very well, so I a not certain
that I have not broken something needed in the process.  In particular,
I don't quite understand what use is translating from/to T61.

So, what should I do?  Should I submit it?  Where to?

Please be advised that it only implements ISO 8859-1 since: a) it is
trivial, b) that's all I needed, c) I don't have info on how to deal
with other character sets and d) I would be unable to test it anyway.
Also, many of the clients included are too smart for their own sake. 
For instance, ldapsearch would show as 'NOT ASCII' any such attribute. 
And the ldbmcat/ldif2ldbm double step breaks somewhere I am still trying
to find.

All the best,


P.S.  BTW, what has Netscape done in Communicator 4.5PR1?  They seem to
have stopped using UTF-8 when building LDAP URL's (I mean you list the
directory and if you double click on a user whose DN has characters
outside of ASCII, it seems to send the request in ISO 8859-1 after
clearing the 8th bit).  I consider it a bug.  Already reported.