bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 2159 in lilypond: Patch: lexer.ll: Warn about non-UTF-8 charac


From: lilypond
Subject: Re: Issue 2159 in lilypond: Patch: lexer.ll: Warn about non-UTF-8 characters
Date: Sun, 01 Jan 2012 19:30:22 +0000


Comment #3 on issue 2159 by address@hidden: Patch: lexer.ll: Warn about non-UTF-8 characters
http://code.google.com/p/lilypond/issues/detail?id=2159

Ok, I am not satisfied. Encode the following in latin-1 and check the result after applying the latest patch:
%{ "Dies ist ein schööner und ergötzlicher Test" %}
There is a wagonload of programming errors. Why? Because the error messages and other stuff want to determine the column numbers for the error messages, and in the absence of legal utf8, there _are_ no well-defined column numbers. And the code supposed to calculate them is not robust enough to do something sensible.

So since Lilypond does not seem robust against sensibly dealing with non-UTF-8 input elsewhere, I suggest making this a _fatal_ error, and if the fatal error is thrown strictly _before_ the first bad byte, it still has a valid column number itself.

A transparent garbage-in-garbage-out can be dealt with warnings, but garbage-in-failure-out should be an error.


reply via email to

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