Could you please tell me what this patch is good for? A BOM not at ...
13 years, 9 months ago
(2011-08-15 18:14:21 UTC)
#1
Could you please tell me what this patch is good for? A BOM not at the
beginning of a file is no longer a BOM...
I don't oppose to emitting a warning if U+FEFF is encountered, and we
subsequently ignore it (since its use as zero width no-break space is
deprecated), but only within strings...
What am I missing?
On 2011/08/15 18:14:21, lemzwerg wrote: > Could you please tell me what this patch is ...
13 years, 9 months ago
(2011-08-15 18:36:53 UTC)
#2
On 2011/08/15 18:14:21, lemzwerg wrote:
> Could you please tell me what this patch is good for? A BOM not at the
> beginning of a file is no longer a BOM...
>
> I don't oppose to emitting a warning if U+FEFF is encountered, and we
> subsequently ignore it (since its use as zero width no-break space is
> deprecated), but only within strings...
>
> What am I missing?
RFC 3629 says that U+FEFF is a zero-width non-breakable space, which is also
used as BOM. It also says:
" This character
can be used as a genuine "ZERO WIDTH NO-BREAK SPACE" within text,"
...
" 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, and MUST
NOT be interpreted as a signature."
Also, our lilypond files are text, so I would understand this that we should
treat the U+FEFF inside the file contents as normal whitespace.
On 2011/08/15 18:14:21, lemzwerg wrote: > Could you please tell me what this patch is ...
13 years, 9 months ago
(2011-08-15 20:07:48 UTC)
#3
On 2011/08/15 18:14:21, lemzwerg wrote:
> Could you please tell me what this patch is good for? A BOM not at the
> beginning of a file is no longer a BOM...
>
> I don't oppose to emitting a warning if U+FEFF is encountered, and we
> subsequently ignore it (since its use as zero width no-break space is
> deprecated), but only within strings...
>
> What am I missing?
The BOM is invisible and you can not be sure whether it is inside a string or
anywhere else. In my experience, it is very common that Windows users
create/open/modify lilypond input files with the Notepad accessory, maybe
inserting new charachters at the very beginning, thus inadvertently moving the
BOM and obtaining failed compiles. Moreover, they are not able to fix the file
because the BOM is invisible. So, the patch would be very useful in that makes
the BOM transparent for the lilypond syntax and the user could forget it at
last.
Issue 4908043: Issue 905: Gracefully ignore UTF-8 BOM in the middle of a file
(Closed)
Created 13 years, 9 months ago by Reinhold
Modified 13 years, 8 months ago
Reviewers: lemzwerg, pacovila, pkx166h
Base URL:
Comments: 0