DBus API problems & UTF-8

Thiago Macieira thiago.macieira at trolltech.com
Mon Jun 12 06:24:54 PDT 2006


Kimmo Hämäläinen wrote:
>Ok, you all have a good point. However, would you oppose an additional
>DBus type for NUL-terminated strings (e.g. DBUS_TYPE_CSTRING)? There is
>quite a bunch of existing C code around that could benefit from it.

But what is a C string? A NUL-terminated sequence of bytes?

How is that different from ARRAY of BYTE?

How are other languages (other than C) going to have a "C 
string" != "string" != "array of bytes"?

I don't see the need to tag "this array of bytes carries a string in an 
arbitrary encoding and may not contain NULs" from "this array of bytes 
carries binary data and may contain NULs". If you can handle the latter, 
you can handle the former.

PS: of course I'm biased: in Qt, we have QString and QByteArray, but we 
dropped QCString.

-- 
Thiago José Macieira - thiago.macieira AT trolltech.com
Trolltech ASA - Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060612/d2aa46fc/attachment-0001.pgp


More information about the dbus mailing list