lilypond-devel
[Top][All Lists]
Advanced

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

Re: lexer.ll: Warn about non-UTF-8 characters (issue 5505090)


From: dak
Subject: Re: lexer.ll: Warn about non-UTF-8 characters (issue 5505090)
Date: Sun, 01 Jan 2012 11:07:53 +0000

On 2012/01/01 10:16:47, Keith wrote:
On Sun, 01 Jan 2012 01:56:04 -0800, <mailto:address@hidden> wrote:


>
http://codereview.appspot.com/5505090/diff/1/lily/lexer.ll#newcode1083
> lily/lexer.ll:1083: LexerWarning (_ ("non-UTF-8 characters").c_str
());
> On 2012/01/01 02:01:11, Keith wrote:
>> I suggest "unsupported file encoding, expected UTF-8"
>
> I think that error message would be appropriate once per run, either
> because of making it a fatal error, or as a summary at the end.  But
> when flagging the actual place where there is a problematic
character?

My suggestion was to emphasize the encoding as the problem, rather
than the
character(s) as the problem --- even if the error is output at each
character
for which the encoding makes a difference.

I actually considered doing an initial scan through the whole file (it
is read into memory after all) and refusing it point blank if there
are non-UTF-8 parts in it.

"non-UTF-8 input" would be a message not requiring mention of either
file or characters, and I can change this accordingly.  The problem I
still see is that either version may just be gibberish to some people.
I have no good idea for a better message.


http://codereview.appspot.com/5505090/



reply via email to

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