utf8 vs ucs2

Ryo Kawahara rkawa at lbe.co.jp
Wed May 23 08:50:25 GMT 2001


Hello .

From: Elrond <elrond at samba.org>
Subject: Re: utf8 vs ucs2
Date: Tue, 22 May 2001 20:07:18 +0200

> On Tue, May 22, 2001 at 08:24:27PM +0900, Ryo Kawahara wrote:
> [...]
> > typedef struct sambastring_tag
> > {
> > 	UINT16* buffer;
> > 	int length;
> > 	...
> > } sambastring;
> > void sambastring_get_os_encode(sambastring* obj, char* out);
> > void sambastring_put_os_encode(sambastring* obj, char* in);
> > void sambastring_get_wire_encode(sambastring* obj, uint16* out);
> > void sambastring_put_wire_encode(sambastring* obj, uint16* in);
> > int sambastring_cmp(sambastring* obj, sambastring* compared);
> > int sambastring_cpy(sambastring* obj, sambastring* to);
> > int sambastring_upper(sambastring* obj);
> > int sambastring_lower(sambastring* obj);
> > ...
> 
> Take a look at tng/source/lib/ustring.[ch], it's about
> that... It's not yet used, and it's broken, and it's not
> even tested, but I wrote it exactly for this stuff...

I 've checked the source. It's almost completely same as
I wrote above! and I also checked that these code are not
used yet in TNG. Maybe TNG team has same problem that
needs lots of rewriting, I suppose (I don't know about TNG
very well).
But I think we can introduce this struct when changing to ucs2
partially because we have to rewrite a lot anyway.

///////////////////////////////////////////////////////////////
// Ryo KAWAHARA
// website: http://www3.lbe.co.jp/~rkawa/
///////////////////////////////////////////////////////////////




More information about the samba-technical mailing list