lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BOM mark from Windows notepad


From: Hans Aberg
Subject: Re: BOM mark from Windows notepad
Date: Thu, 19 Nov 2009 10:35:19 +0100

On 19 Nov 2009, at 00:41, Patrick McCarty wrote:

Also, the conditions and the stuff following might possibly be
removed. Something like:
 {BOM_UTF8} {}
or
 {BOM_UTF8}+ {}

If a language always zips out spaces, one can have rules:
 [ \f\r\t\v]+ {}
 \n+          { \* Maybe action here counting lines */ }
Then the BOM should just be treated as the other spaces and tabs.

This follows the behavior recommended by RFC 3629, so this is the
behavior LilyPond should follow, too.

More specifically, RFC 3629 states that

 "It is important to understand that the character U+FEFF appearing
 at any position other than the beginning of a stream MUST be
 interpreted with the semantics for the zero-width non-breaking
 space..."

I think that it was changed. If the BOM is only allowed in the beginning of the file, it becomes a state-dependent character. For example, if one includes two files verbatim in another, then the BOMs will no longer be in the beginning of the combined stream. So therefore this state-less definition is to be preferred.

So once upon the time, BOMs were intended to be used only in the beginning if the file, and LilyPond conforms to that. But not to this later definition. - My impression. :-)

  Hans






reply via email to

[Prev in Thread] Current Thread [Next in Thread]