.desktop file format ambiguity

Boris Zbarsky bzbarsky at MIT.EDU
Tue Oct 14 08:52:17 PDT 2008


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.

In practice, I believe there are parsers that treat the whitespace as 
part of the key and value... not sure about ones that don't.

In any case, this section could use some clarification.

-Boris


More information about the xdg mailing list