DBus API problems & UTF-8

Kimmo Hämäläinen kimmo.hamalainen at nokia.com
Mon Jun 12 05:26:00 PDT 2006

On Mon, 2006-06-12 at 15:08, ext Matthew Johnson wrote:
> On Mon, 12 Jun 2006, Kimmo Hmlinen wrote:
> >
> > Yes, I'm sure Gtk application developers like it, but sometimes UTF-8
> > does not make much sense. Sometimes they just want to pass C strings
> > around conveniently.
> >
> The point is that you don't know who is calling your DBus functions,
> from what language. If you export a method then your programs might be
> happy talking iso-whatever, but another programmer writing in Qt, Java
> and so on might not be. Not everyone has C-strings, as a Java developer
> I don't want to have to read in your byte array and convert it to UTF8
> (which all strings are in Java).
> DBus should be standardising what goes over the wire so that it is easy
> for people to access your interfaces from any language. Allowing
> arbitrary encodings does not support this.

Yes, I'm not against allowing this. I think C strings and UTF-8 strings
can both be supported, don't they? Using byte arrays to pass C strings
is not as convenient as passing around UTF-8 encoded strings.

However, this UTF-8 issue is a minor thing. I'm more concerned about the
broken API in the client library. I think it needs to be fixed as soon
as possible, to minimise amount of code that needs to migrate to the
fixed API.

BR; Kimmo

> Matt

More information about the dbus mailing list