Managing DNs in libads only in utf8

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Feb 27 08:52:32 GMT 2007


On Tue, Feb 27, 2007 at 06:57:45PM +1100, tridge at samba.org wrote:
> Meanwhile, way out in left field, I did mention to Simo on IRC an idea
> of how we could handle this in another way. Our core problem is that
> we can't tell what charset a "char*" is. Well, with talloc we could
> tell, by making the talloc "type" of the string be the charset. At the
> moment we make the "type" be the contents of the string, just because
> there wasn't anything else useful to put in there.

We mainly have this problem with LDAP right now, and I don't
see us having arbitrary charset strings in one smbd. We
would have UTF16 which we already have a special type for,
we have unix charset (char *) and we potentially have UTF8
as a special outstanding one.

Why not use our old struct trick and have a 

struct utf8_string {
	char str[1]; /* implicitly more allocated */
};

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070227/5278f1c7/attachment.bin


More information about the samba-technical mailing list