svn commit: samba r11105 - in branches/SAMBA_4_0/source:
librpc/ndr pidl/lib/Parse/Pidl pidl/lib/Parse/Pidl/Samba/NDR
jelmer at samba.org
Mon Oct 17 18:31:36 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Michael B Allen wrote:
> On Mon, 17 Oct 2005 10:20:06 +0200 Jelmer Vernooij
> <jelmer at samba.org> wrote:
>>>> This breaks xattr binary compatibility with previous versions
>>>> - is that a problem?
>>> I'd prefer not to break compatibility unless its really
>>> necessary. Can we really not support a simple null terminated
>>> utf8 string now?
>>> The reason I deliberately chose the old format is that it is
>>> particularly simple to hand marshall. The xattr.idl is written
>>> as IDL for us, but I am hoping other projects (wine, the kernel
>>> etc) will support our xattr format. Keeping the format really
>>> easy to hand marshall makes it easier for those projects to not
>>> use an IDL compiler if they don't want to.
>>> It it impossible to support a simple null terminated utf8
>>> string with the new [string] approach?
>> The problem is not so much in that pidl can't support "simple"
>> null-terminated utf8 strings, but more in the fact that it is not
>> possible to use it in other IDL compilers (such as MIDL or
>> WIDL). Please let me know which of the two you prefer, and I'll
>> fix it.
> How about providing an optional wire encoding in parathesis like
> [string(UTF-8)] where the encoding is the standard identifier used
> by iconv? This way you can keep unistr AND support [string]. This
> is what I think I'm going to do with midlc but I haven't really
> looked into it yet so I don't know if it works out in practice.
We used to have a data type 'string' (as you might have seen) from
which unistr was derived. We are now migrating to using [string]
everywhere, but optionally also specifying the character set (for
automatic conversion, very similar to what you propose), with the
"charset" attribute. For example:
[charset(UTF16),string] uint16 *foo_bar;
The allowed arguments for charset() are currently UTF8, DOS, UTF16,
UNIX and UTF16_BE, but I'd be happy to change that if there is good
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the samba-technical