udisks 1.93.0
David Zeuthen
zeuthen at gmail.com
Wed Apr 11 13:15:54 PDT 2012
Hi,
On Tue, Apr 10, 2012 at 5:29 PM, Serghei Amelian <serghei at thel.ro> wrote:
> I have a curiosity, for what reason some properties still array of bytes (i.e.
> Device and PreferredDevice). They cannot be represented as strings?
Strings in D-Bus must be valid UTF-8 and, technically, nothing is
preventing the kernel or an udev rule to use another encoding for
device names. Ditto with other udev properties and contents of sysfs
files. Or things like entries in configuration files such as
/etc/fstab or /etc/crypttab.
That said, I'm more and more leaning to just ignoring devices which
has strings that are not valid UTF-8. Why? Because it's just
completely meaningless to convey strings without specifying the
encoding. And we're not going to do any guessing games and punting the
problem to the client (by using 'ay' in the APIs) is not going to work
well either.
So I'll probably do that "small" API/ABI break in udisks2 soon
(shouldn't break libudisks2 due to how the that code is generated).
As a data point, systemd is doing roughly the same, e.g. using UTF-8
strings in most of it APIs.
Thanks,
David
More information about the devkit-devel
mailing list