bug-lilypond
[Top][All Lists]
Advanced

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

Re: \displayMusic and UTF-8


From: David Kastrup
Subject: Re: \displayMusic and UTF-8
Date: Sun, 24 Apr 2016 11:51:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Malte Meyn <address@hidden> writes:

> Hi list,
>
> attached you find a file that tries to \displayMusic a string
> containing the apostrophe ’ (U+2019). Everything fine with this file
> says my hexeditor. But not with lilypond’s output which you find in
> the attached file displayMusic_utf8_output.txt.
>
> The apostrophe from the source (displayMusic_utf8.ly):
> E2 80 99 = U+2019
> The ‘apostrophe’ from the output:
> E2 5C 78 38 30 99 = garbage, 5C is not a valid UTF-8 continuation byte.
>
> The substring 5C 78 38 30 is ASCII/UTF-8 for \x80 so it’s not
> completely random ;)
>
> Malte
>
> \version "2.19.40"
>
> \void \displayMusic \tempo "l€™istesso tempo"
>
>
> (make-music
>   'TempoChangeEvent
>   'metronome-count
>   #f
>   'tempo-unit
>   #f
>   'text
>   "l\x80™istesso tempo")

That's a Guile-1 artifact which has no idea of UTF-8.  You'll find that
if you read that exact byte sequence back into Guile-1.8 (for example,
by putting a $ in front of the make-music expression and using an editor
which will not balk at preserving the bytes surrounding \x80), it will
work perfectly fine.

-- 
David Kastrup



reply via email to

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