utf8 vs ucs2

Elrond elrond at samba.org
Tue May 22 18:20:27 GMT 2001

On Tue, May 22, 2001 at 06:27:34AM -0700, Andrew Tridgell wrote:
> Mike,
> > Right, I'm just thinking that once you have "decoded" the RPC message
> > you probably want everything in native word order so you can use the
> > "standard" UCS2 string functions.  
> yes, I think that probably is best, but some people have argued for
> supporting both byte orders in Sambas unicode strings before. I didn't
> find it really convincing at the time but I wasn't all that interested
> in unicode at the time either so I didn't listen much.

Yes, I have to add to this:

I would also like the internel ucs2 to be in native byte
order. It makes a bunch of things easier.

We fighted this stuff in TNG a while back... (password
changing is real annoying...) and TNG uses native byte
order for ucs2 string in its RPC code already for a long
time now.

> Jeremy, do you remember the arguments for having internal strings in
> the byte order that the client negotiates? What did we decide about
> that? I remember we talked about it at the last cifs con, but I don't
> remember the details.

I can only think of one reason:

You don't need to byte-swap, when writing SMB on the wire.

But maybe there's more... no idea.


More information about the samba-technical mailing list