.desktop file format ambiguity
Vincent Untz
vuntz at gnome.org
Mon Dec 1 15:35:05 PST 2008
Le mardi 14 octobre 2008, à 11:44 -0400, Boris Zbarsky a écrit :
> I have a question about the treatment of whitespace in .desktop files
> [1]. The file format description says:
>
> Entries in the file are {key,value} pairs in the format:
>
> Key=Value
>
> Space before and after the equals sign should be ignored; the = sign
> is the actual delimiter.
>
> Only the characters A-Za-z0-9- may be used in key names.
>
> I see two ways of interpreting this: either "the = sign is the actual
> delimiter" (and whitespace is ignored purposes of splitting the line
> into key and value, and thus ends up in the key or the value depending
> on which side of the '=' it's on) or whitespace is ignored completely.
> The latter would match the "Only the characters A-Za-z0-9- may be used
> in key names" thing better.
I'm not quite sure how it's ambiguous: the delimiter is = and spaces
before/after this sign should be ignored. So those lines are exactly the
same lines:
Key=Value
Key = Value
Key =Value
Key= Value
I'm not quite sure how you came to your first way of interpreting this;
it doesn't feel logical to me. But if we can clarify things, sure. Any
proposal to improve the wording? :-)
Vincent
--
Les gens heureux ne sont pas pressés.
More information about the xdg
mailing list