[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: DBus API problems & UTF-8
From:       Thiago Macieira <thiago.macieira () trolltech ! com>
Date:       2006-06-12 13:24:54
Message-ID: 200606121524.54770.thiago.macieira () trolltech ! com
[Download RAW message or body]


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

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic