DBus API problems & UTF-8

Daniel P. Berrange dan at berrange.com
Mon Jun 12 06:05:28 PDT 2006


On Mon, Jun 12, 2006 at 03:32:02PM +0300, Kimmo H?m?l?inen wrote:
> On Mon, 2006-06-12 at 15:47, ext Daniel P. Berrange wrote:
> ...
> > If you're not already using UTF-8 in your C program, then its at most one 
> > single method call to convert. Unless your strings are absolutely enourmous
> > the performance hit of the conversion shouldn't show up as a large hotspot.
> > In any case this is a small price to pay for cross-application interoperability. 
> 
> 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.

The trouble, is when a client talks to a service, it now has to decide
whether to use C String, or UTF-8 string. So, either every application
(or the language bindings) would need to be updated support both formats, 
or you'd end up with a situation where only some apps spport C strings, 
which wouldn't be good for interoperability. Since there is no compelling
reason for most apps to support C strings, unfortunately I think we'd
end up in the latter situation which isn't a very desirable result.

Regards,
Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060612/dfbde3ef/attachment.pgp


More information about the dbus mailing list