[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Swedish letters in Lilypond lyrics?
From: |
David Kastrup |
Subject: |
Re: Swedish letters in Lilypond lyrics? |
Date: |
Tue, 19 Jan 2016 22:34:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
address@hidden writes:
> David Kastrup:
>> address@hidden writes:
>> > David Kastrup:
>> >> address@hidden writes:
>> > ...
>> >> > BTW, does someone know why add-text-replacements in attached file
>> >> > doesn't work ?
>> >> > I got the syntax from:
>> >> > http://www.gnu.org/software/guile/manual/html_node/String-Syntax.html#String-Syntax
>> >> That's the Guile-2.0 manual. LilyPond uses 1.8 at the moment.
>> > Hmm, so basically it can't be done.
>> Nonsense. You just need to use octal escapes for the actual UTF-8 byte
>> sequences. And you'll probably need to revisit that input once
>> Guile-2.0 actually gets used: I don't think there is an obvious
>> "portable" way to do it.
>
> So, if neither of the ;-commented out lines below work, what do I do?
>
> \paper {
> #(include-special-characters)
>
> #(add-text-replacements!
> '(
> ("100" . "hundred")
> ("dpi" . "dots per inch")
> ;(":a" . "\u00E4" )
> ;(":b" . "\x00\xE4" )
> ;(":c" . (list->string (\x00 \xE4)) )
> ;(":d" . $ \markup \char ##x00E4 $ )
> ))
> }
Uh, do you actually know what UTF-8 is? \x00\xE4 would rather be
UTF-16BE. The UTF-8 byte sequence is "\xc3\xa4" instead which works.
\x00 is not a valid number or character and you use it like a function
call because of failing to quote. #\000 would be a character, but it
needs to be in octal, so we are talking here about
(list->string '(#\303 #\244))
$ is not a valid method to escape from Scheme into LilyPond but rather
the other way round.
#{ \markup \char ##x00e4 #} does not work since markup commands like
\char are only evaluated at markup interpretation time.
You can use (ly:char->utf8 #x00e4) instead.
--
David Kastrup
- Re: Swedish letters in Lilypond lyrics?, (continued)
- Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/18
- Re: Swedish letters in Lilypond lyrics?, Andrew Bernard, 2016/01/18
- Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, Andrew Bernard, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, karl, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, David Kastrup, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, karl, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, David Kastrup, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, karl, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?,
David Kastrup <=
- Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/19
- Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/19
Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/21
Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/18
Re: Swedish letters in Lilypond lyrics?, Simon Albrecht, 2016/01/18