[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Programming error" message
From: |
Patrick McCarty |
Subject: |
Re: "Programming error" message |
Date: |
Sun, 28 Feb 2010 10:54:02 -0800 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On 2010-02-28, Werner LEMBERG wrote:
>
> > I neglected to mention that in recent 2.13 versions, the warning
> > messages for invalid character encoding look like this:
> >
> > (process:1375): Pango-WARNING **: Invalid UTF-8 string passed to
> > pango_layout_set_text()
> >
> > These warnings are generated by Pango.
> >
> > Is this an improvement?
>
> Yes, thanks. I assume that it is not possible to add the offending
> text string to the warning message since a Pango warning is not
> visible to lilypond... Perhaps it makes sense to add a UTF-8 checker
> to lilypond just for that.
It would be very simple to check for invalid UTF-8, since we can use
GLib's g_utf_validate() function. In fact, Pango uses this same
function in pango_layout_set_text().
Unfortunately, it would be much more complicated (I think) to output
the offending string, since we would have to convert an arbitrarily
encoded string to UTF-8, and then display it along with the
warning/error.
And this assumes we are dealing with a UTF-8 locale.
What if we output a message like this instead:
warning: invalid UTF-8 string found at row 3, column 10
I think this would be easier to implement.
Thanks,
Patrick
- "Programming error" message, Tim McNamara, 2010/02/26
- Re: "Programming error" message, Patrick McCarty, 2010/02/26
- Re: "Programming error" message, Tim McNamara, 2010/02/26
- Re: "Programming error" message, Patrick McCarty, 2010/02/26
- Re: "Programming error" message, Tim McNamara, 2010/02/26
- Re: "Programming error" message, Patrick McCarty, 2010/02/27
- Re: "Programming error" message, Werner LEMBERG, 2010/02/27
- Re: "Programming error" message, Patrick McCarty, 2010/02/28
- Re: "Programming error" message, Werner LEMBERG, 2010/02/28
- Re: "Programming error" message, Graham Percival, 2010/02/28
- Re: "Programming error" message,
Patrick McCarty <=
- Re: "Programming error" message, Werner LEMBERG, 2010/02/28
- Re: "Programming error" message, Tim McNamara, 2010/02/28
- Re: "Programming error" message, Patrick McCarty, 2010/02/28
- Re: "Programming error" message, Tim McNamara, 2010/02/28