* Is ASCII the expected udev character encoding?
@ 2011-09-30 8:30 James Hunt
2011-09-30 9:45 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: James Hunt @ 2011-09-30 8:30 UTC (permalink / raw)
To: linux-hotplug
Hi All,
Working on the Ubuntu bug below where a battery unit is exposing non-printable characters via udev
made me wonder: is the expected character encoding for all udev messages ASCII? Or is the
expectation that the kernel simply acts as a pass-through (such that it is the responsibility of
userspace to determine the exact meaning of such messages)? If ASCII is expected, should this be
made manifest somewhere?
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/829980
I'm happy to provide a kernel patch for the bug above, but need to understand whether the kernel
should be sanitizing udev message content, or leaving that up to userspace.
Kind regards,
James.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Is ASCII the expected udev character encoding?
2011-09-30 8:30 Is ASCII the expected udev character encoding? James Hunt
@ 2011-09-30 9:45 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2011-09-30 9:45 UTC (permalink / raw)
To: linux-hotplug
On Fri, Sep 30, 2011 at 10:30, James Hunt <james.hunt@ubuntu.com> wrote:
> Working on the Ubuntu bug below where a battery unit is exposing non-printable characters via udev
> made me wonder: is the expected character encoding for all udev messages ASCII? Or is the
> expectation that the kernel simply acts as a pass-through (such that it is the responsibility of
> userspace to determine the exact meaning of such messages)? If ASCII is expected, should this be
> made manifest somewhere?
>
> Â https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/829980
>
> I'm happy to provide a kernel patch for the bug above, but need to understand whether the kernel
> should be sanitizing udev message content, or leaving that up to userspace.
There are no rules really. Especially not about valid utf8 encoding,
or printable chars only.
If you use D-Bus to transport udev properties as D-Bus strings, you
need to make sure they are valid utf8, or use byte arrays instead of
strings.
Kay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-30 9:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30 8:30 Is ASCII the expected udev character encoding? James Hunt
2011-09-30 9:45 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).