Seeking clarification of Desktop Entry Specification

rhkramer at rhkramer at
Fri Apr 24 12:43:23 UTC 2020

On Friday, April 24, 2020 06:37:59 AM Stephan Bergmann wrote:
> I have three questions regarding
> <
> ec-1.1.html>:
> (1)  #basic-format says "A file is interpreted as a series of lines that
> are separated by linefeed characters."  #value-types says "The escape
> sequences \s, \n, \t, \r, and \\ are supported for values of type string
> and localestring, meaning ASCII space, newline, tab, carriage return,
> and backslash, respectively."  Even though the former is about the
> structure of the file itself while the latter is about the encoded
> payload, it is confusing that one talks about "linefeed" while the other
> talks about "newline" and "carriage return".  Should "newline" read
> "linefeed" (meaning U+000A LINE FEED) instead?

Replying only to (1) re linefeed / newline characters:

Some of the ambiguity / confusion no doubt is because of differences among 
Windows / Linux / Mac usage to indicate line ends.

I won't get these details correct, but you'll get the idea:

Linux uses \n to indicate the end of a line

Windows uses (iirc) \r\n (2 characters, but maybe it is \n\r) to indicate the 
end of a line

Mac (at least the older versions -- the newer versions, based on BSD may use 
\n like Linux) uses \r to indicate the end of a line

(When I talk about things like this, I typically point out that, in (wrapped) 
text files, those line endings indicate the end of a paragraph, not a single 
line -- maybe I'm being a little ambiguous here, so I'll think about 
clarifying that.)

More information about the xdg mailing list