Desktop entry spec, allowed characterss
Matthias Clasen
mclasen at redhat.com
Wed Jan 10 05:15:47 PST 2007
I recently changed the GKeyFile parser in glib to more faithfully
implement the .ini-file format flavour described in the desktop entry
spec. The was triggered by a bug complaining that the glib support
wasn't symmetric, ie it could produce files that it failed to read
in later.
It turned out that the restriction of keys to A-Za-z0-9- is problematic,
since users of GKeyFile use e.g. mime types (like application/x-foo or
image/*) as keys. I'd like to propose that the desktop entry spec
should be changed to allow such characters in keys (at least /_+*. ,
possibly more). Otherwise I will have to make GKeyFile deviate from
the desktop entry spec format, to avoid breaking existing users.
I have also had one bug report that complained about ' ' not being
allowed in keys anymore, but allowing that would be a bit problematic,
since the spec specifies that whitespace is stripped around the = sign.
That could lead to a situation where
foo [en] = foo
is a valid entry for the key 'foo ', but
foo = bar
is an entry for the key 'foo'.
Matthias
More information about the xdg
mailing list