Re: UTF-8 characters in filenames with Lilypond 2.23
On Wed, 2022-05-25 at 13:24 -0600, David F. wrote: > > > On May 25, 2022, at 11:21 AM, Jonas Hahnfeld wrote: > > > > On Sat, 2022-05-21 at 15:20 -0600, David F. wrote: > > > System: Intel-based macOS > > > > > > I make extensive use of UTF-8 characters in the filenames of my Lilypond > > > files. This works in Lilypond up through version 2.22. But Lilypond > > > 2.23 cannot handle UTF-8 characters in filenames. > > > > > > Filename: tést.ly > > > > > > \version "2.22" > > > > > > { c' } > > > > > > > > > Under v2.22, this file complies without problem. With 2.23 (including > > > the just release 2.23.9) I get the following error: > > > > > > Starting lilypond 2.23.9 [tést.ly]... > > > warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' > > > fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" > > > Exited with return code 1. > > > > > > I thought that this problem had already been reported, but I can’t find > > > any mention of it now. So I’m reporting it. > > > > > > David F. > > > > Hi David, > > > > I can indeed reproduce this on macOS, which I think is the critical > > piece of information here. It would just be too boring if all operating > > systems agreed on how to handle filenames with special characters... In > > this case, it might also have to do with the file system because if I > > do 'ls', I also get question marks (but this might also be because I'm > > ssh-ing from Linux...) No, it didn't have to do with the file system, the scripts for building the binaries were just missing an environment variables so that libintl was properly found on macOS, which is apparently required for some locale settings. The problem should be fixed in the next release, see https://gitlab.com/lilypond/lilypond/-/merge_requests/1410 (Actually, this will also fix localized messages on macOS which didn't work so far.) > > Thanks for looking into this Jonas. As I said in my original message > Lilypond up to v2.22 handles UTF characters just fine. LilyPond 2.22.x used Guile 1.8 with binaries produced by a different system (called GUB). Jonas signature.asc Description: This is a digitally signed message part
Re: UTF-8 characters in filenames with Lilypond 2.23
On Sat 21 May 2022 at 23:36:26 (-0600), David F. wrote: > > On May 21, 2022, at 5:01 PM, Jean Abou Samra wrote: > > Le 21/05/2022 à 23:20, David F. a écrit : > >> System: Intel-based macOS > >> > >> I make extensive use of UTF-8 characters in the filenames of my Lilypond > >> files. This works in Lilypond up through version 2.22. But Lilypond 2.23 > >> cannot handle UTF-8 characters in filenames. > >> > >> Filename: tést.ly > >> > >> \version "2.22" > >> > >> { c' } > >> > >> > >> Under v2.22, this file complies without problem. With 2.23 (including the > >> just release 2.23.9) I get the following error: > >> > >> Starting lilypond 2.23.9 [tést.ly]... > >> warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' > >> fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" > >> Exited with return code 1. > >> > >> I thought that this problem had already been reported, but I can’t find > >> any mention of it now. So I’m reporting it. > > > > This is actually not an issue with LilyPond, but with Frescobaldi, > > when you have "run LilyPond with English messages" enabled in the > > Preferences. This problem is known for some time already, but > > I didn't see an issue in the Frescobaldi tracker, so I just > > opened one: > > > > https://github.com/frescobaldi/frescobaldi/issues/1438 > > > > The workaround is to uncheck "Run LilyPond with English messages" > > in Edit > Preferences > LilyPond Preferences. > > No, I get the same error running lilypond from the command line: > > $ lilypond --png tést.ly > GNU LilyPond 2.23.9 (running Guile 2.2) > warning: cannot find file: `t??st.ly' > fatal error: failed files: "t??st.ly” I didn't spot this until I read Hraban's post about MacOS, about which I know almost nothing, but your two errors are not the same. Compared in close proximity, you can more easily see: warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' ↑ warning: cannot find file: `t??st.ly' So it looks as if the first error is a normalisation error: é has been decomposed into e + ´, or rather e + COMBINING ACUTE ACCENT U+0301, the latter being CC81 in utf-8, whereas the second error looks like a composed é, which is C3A9 in utf-8. Each appears to generate two question marks, but the first leaves the initial e in place, so three chars in all. >From glancing at pages like: https://mjtsai.com/blog/2017/03/24/apfss-bag-of-bytes-filenames/ https://news.ycombinator.com/item?id=14495823 and the article discussed in the latter (there's a link at the top), I don't envy anyone supporting these filesystems. Is Python's unicodedata.normalize("NFKC", … ) meant to handle all this? Cheers, David.
Re: UTF-8 characters in filenames with Lilypond 2.23
> On May 25, 2022, at 11:21 AM, Jonas Hahnfeld wrote: > > On Sat, 2022-05-21 at 15:20 -0600, David F. wrote: >> System: Intel-based macOS >> >> I make extensive use of UTF-8 characters in the filenames of my Lilypond >> files. This works in Lilypond up through version 2.22. But Lilypond 2.23 >> cannot handle UTF-8 characters in filenames. >> >> Filename: tést.ly >> >> \version "2.22" >> >> { c' } >> >> >> Under v2.22, this file complies without problem. With 2.23 (including the >> just release 2.23.9) I get the following error: >> >> Starting lilypond 2.23.9 [tést.ly]... >> warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' >> fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" >> Exited with return code 1. >> >> I thought that this problem had already been reported, but I can’t find any >> mention of it now. So I’m reporting it. >> >> David F. > > Hi David, > > I can indeed reproduce this on macOS, which I think is the critical > piece of information here. It would just be too boring if all operating > systems agreed on how to handle filenames with special characters... In > this case, it might also have to do with the file system because if I > do 'ls', I also get question marks (but this might also be because I'm > ssh-ing from Linux...) > > Jonas Thanks for looking into this Jonas. As I said in my original message Lilypond up to v2.22 handles UTF characters just fine. David F.
Re: UTF-8 characters in filenames with Lilypond 2.23
Am 25.05.22 um 19:21 schrieb Jonas Hahnfeld via LilyPond user discussion: On Sat, 2022-05-21 at 15:20 -0600, David F. wrote: System: Intel-based macOS I make extensive use of UTF-8 characters in the filenames of my Lilypond files. This works in Lilypond up through version 2.22. But Lilypond 2.23 cannot handle UTF-8 characters in filenames. Filename: tést.ly \version "2.22" { c' } Under v2.22, this file complies without problem. With 2.23 (including the just release 2.23.9) I get the following error: Starting lilypond 2.23.9 [tést.ly]... warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" Exited with return code 1. I thought that this problem had already been reported, but I can’t find any mention of it now. So I’m reporting it. David F. Hi David, I can indeed reproduce this on macOS, which I think is the critical piece of information here. It would just be too boring if all operating systems agreed on how to handle filenames with special characters... In this case, it might also have to do with the file system because if I do 'ls', I also get question marks (but this might also be because I'm ssh-ing from Linux...) MacOS uses decomposed Unicode in the file system, i.e. é is e + combining accent acute and not just one glyph. (It also decomposes accented characters, at least umlauts, if you copy from a PDF – very annoying...) Hraban
Re: UTF-8 characters in filenames with Lilypond 2.23
On Sat, 2022-05-21 at 15:20 -0600, David F. wrote: > System: Intel-based macOS > > I make extensive use of UTF-8 characters in the filenames of my Lilypond > files. This works in Lilypond up through version 2.22. But Lilypond 2.23 > cannot handle UTF-8 characters in filenames. > > Filename: tést.ly > > \version "2.22" > > { c' } > > > Under v2.22, this file complies without problem. With 2.23 (including the > just release 2.23.9) I get the following error: > > Starting lilypond 2.23.9 [tést.ly]... > warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' > fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" > Exited with return code 1. > > I thought that this problem had already been reported, but I can’t find any > mention of it now. So I’m reporting it. > > David F. Hi David, I can indeed reproduce this on macOS, which I think is the critical piece of information here. It would just be too boring if all operating systems agreed on how to handle filenames with special characters... In this case, it might also have to do with the file system because if I do 'ls', I also get question marks (but this might also be because I'm ssh-ing from Linux...) Jonas signature.asc Description: This is a digitally signed message part
Re: UTF-8 characters in filenames with Lilypond 2.23
On Tue 24 May 2022 at 20:59:18 (-0700), Curt McDowell wrote: > I get that same error if running under Docker, if LANG is set to > en_US.UTF-8, but where en_US.UTF-8 does not exist in the output of > "locale -a". > >./out/bin/lilypond scheme-sandbox /(Lilypond 2.23.0, Guile 2.2.7, >Ubuntu 20.04)/ >(open-input-file "tést.ly") >In procedure open-file: No such file or directory: "t??st.ly" > > Changing LANG makes Guile happy > >export LANG=C.UTF-8 >./out/bin/lilypond scheme-sandbox >(open-input-file "tést.ly") >$1 = # > > but strangely it still does not make Lilypond happy > >./out/bin/lilypond tést.ly >warning: cannot find file: `t??st.ly' > > I don't know why. It might help for us to see your entire locale, in case something is overriding LANG. Then again, it might not: (first, my disclosures) $ cat /etc/default/locale LANG=C.UTF-8 LC_CTYPE="en_GB.UTF-8" $ which generates: $ locale LANG=C.UTF-8 LANGUAGE= LC_CTYPE=en_GB.UTF-8 LC_NUMERIC="C.UTF-8" LC_TIME="C.UTF-8" LC_COLLATE="C.UTF-8" LC_MONETARY="C.UTF-8" LC_MESSAGES="C.UTF-8" LC_PAPER="C.UTF-8" LC_NAME="C.UTF-8" LC_ADDRESS="C.UTF-8" LC_TELEPHONE="C.UTF-8" LC_MEASUREMENT="C.UTF-8" LC_IDENTIFICATION="C.UTF-8" LC_ALL= $ Available locales: $ locale -a C C.UTF-8 POSIX en_GB.utf8 en_US.utf8 $ > Lilypond 2.20.0 works in the same environment and seems insensitive to LANG. Yes, 2.22 also, to anything: $ LC_ALL=de_DE.UTF-8 lily -s /tmp/wwéstärn.ly bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8) GNU LilyPond 2.22.1 Processing `wwéstärn.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Converting to `wwéstärn.pdf'... Success: compilation successfully completed $ And 2.18.2 LP itself is unfazed, but locale trips up ghostscript: $ LC_ALL=de_DE.UTF-8 lily -o /tmp/wwéstärn.ly bash: warning: setlocale: LC_ALL: cannot change locale (de_DE.UTF-8) GNU LilyPond 2.18.2 Processing `wwéstärn.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `wwéstärn.ps'... Converting to `./wwéstärn.pdf'... warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite -sOutputFile=./wwéstärn.pdf -c.setpdfwrite -fwwéstärn.ps)' failed (256) fatal error: failed files: "wwéstärn.ly" $ OTOH, one might expect this problem: $ LC_CTYPE=de_DE.UTF-8 lily /tmp/wwéstärn.ly bash: warning: setlocale: LC_CTYPE: cannot change locale (de_DE.UTF-8) GNU LilyPond 2.23.9 (running Guile 2.2) warning: cannot find file: `ww??st??rn.ly' fatal error: failed files: "ww??st??rn.ly" $ but perhaps not this one, as LC_CTYPE should override LANG (I've made it explicit as well as being my default): $ LANG=de_DE.UTF-8 LC_CTYPE=en_GB.UTF-8 lily /tmp/wwéstärn.ly GNU LilyPond 2.23.9 (running Guile 2.2) warning: cannot find file: `ww??st??rn.ly' fatal error: failed files: "ww??st??rn.ly" $ But you should be able to get everything to work with LC_ALL: $ LC_ALL=en_GB.UTF-8 LANG=de_DE.UTF-8 LC_CTYPE=de_DE.UTF-8 lily /tmp/wwéstärn.ly GNU LilyPond 2.23.9 (running Guile 2.2) Processing `wwéstärn.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Converting to `wwéstärn.pdf'... Success: compilation successfully completed $ Cheers, David.
Re: UTF-8 characters in filenames with Lilypond 2.23
I get that same error if running under Docker, if LANG is set to en_US.UTF-8, but where en_US.UTF-8 does not exist in the output of "locale -a". ./out/bin/lilypond scheme-sandbox /(Lilypond 2.23.0, Guile 2.2.7, Ubuntu 20.04)/ (open-input-file "tést.ly") In procedure open-file: No such file or directory: "t??st.ly" Changing LANG makes Guile happy export LANG=C.UTF-8 ./out/bin/lilypond scheme-sandbox (open-input-file "tést.ly") $1 = # but strangely it still does not make Lilypond happy ./out/bin/lilypond tést.ly warning: cannot find file: `t??st.ly' I don't know why. Lilypond 2.20.0 works in the same environment and seems insensitive to LANG. -Curt On 5/21/2022 10:36 PM, David F. wrote: No, I get the same error running lilypond from the command line: $ lilypond --png tést.ly GNU LilyPond 2.23.9 (running Guile 2.2) warning: cannot find file: `t??st.ly' fatal error: failed files: "t??st.ly” David F.
Re: UTF-8 characters in filenames with Lilypond 2.23
Thomas Morley writes: > Am So., 22. Mai 2022 um 07:36 Uhr schrieb David F. : >> >> >> >> > On May 21, 2022, at 5:01 PM, Jean Abou Samra wrote: >> > >> > Le 21/05/2022 à 23:20, David F. a écrit : >> >> System: Intel-based macOS >> >> >> >> I make extensive use of UTF-8 characters in the filenames of my >> >> Lilypond files. This works in Lilypond up through version 2.22. >> >> But Lilypond 2.23 cannot handle UTF-8 characters in filenames. >> >> >> >> Filename: tést.ly >> >> >> >> \version "2.22" >> >> >> >> { c' } >> >> >> >> >> >> Under v2.22, this file complies without problem. With 2.23 >> >> (including the just release 2.23.9) I get the following error: >> >> >> >> Starting lilypond 2.23.9 [tést.ly]... >> >> warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' >> >> fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" >> >> Exited with return code 1. >> >> >> >> I thought that this problem had already been reported, but I >> >> can’t find any mention of it now. So I’m reporting it. >> >> >> >> David F. >> > >> > >> > This is actually not an issue with LilyPond, but with Frescobaldi, >> > when you have "run LilyPond with English messages" enabled in the >> > Preferences. This problem is known for some time already, but >> > I didn't see an issue in the Frescobaldi tracker, so I just >> > opened one: >> > >> > https://github.com/frescobaldi/frescobaldi/issues/1438 >> > >> > The workaround is to uncheck "Run LilyPond with English messages" >> > in Edit > Preferences > LilyPond Preferences. >> > >> > Best, >> > Jean >> > >> >> No, I get the same error running lilypond from the command line: >> >> $ lilypond --png tést.ly >> GNU LilyPond 2.23.9 (running Guile 2.2) >> warning: cannot find file: `t??st.ly' >> fatal error: failed files: "t??st.ly” >> >> David F. >> >> > > Being on Ubuntu 20.04.4 all works fine with 2.23.9 and current master. "Being on Ubuntu" tells a much less relevant story as locale does. My own is comparatively weird with LANG=en_US.UTF-8 LANGUAGE=en LC_CTYPE="en_US.UTF-8" LC_NUMERIC=POSIX LC_TIME=de_DE.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=de_DE.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=de_DE.UTF-8 LC_NAME=de_DE.UTF-8 LC_ADDRESS=de_DE.UTF-8 LC_TELEPHONE=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=de_DE.UTF-8 LC_ALL= and has few localisation problems. Other settings, however, may exhibit more problems under some circumstances. Particularly non-US settings of LC_NUMERIC can mess up number formatting (like when generating PostScript) and localised settings of LC_CTYPE are what tends to mess with file name recognition and other console communication. -- David Kastrup
Re: UTF-8 characters in filenames with Lilypond 2.23
Am So., 22. Mai 2022 um 07:36 Uhr schrieb David F. : > > > > > On May 21, 2022, at 5:01 PM, Jean Abou Samra wrote: > > > > Le 21/05/2022 à 23:20, David F. a écrit : > >> System: Intel-based macOS > >> > >> I make extensive use of UTF-8 characters in the filenames of my Lilypond > >> files. This works in Lilypond up through version 2.22. But Lilypond 2.23 > >> cannot handle UTF-8 characters in filenames. > >> > >> Filename: tést.ly > >> > >> \version "2.22" > >> > >> { c' } > >> > >> > >> Under v2.22, this file complies without problem. With 2.23 (including the > >> just release 2.23.9) I get the following error: > >> > >> Starting lilypond 2.23.9 [tést.ly]... > >> warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' > >> fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" > >> Exited with return code 1. > >> > >> I thought that this problem had already been reported, but I can’t find > >> any mention of it now. So I’m reporting it. > >> > >> David F. > > > > > > This is actually not an issue with LilyPond, but with Frescobaldi, > > when you have "run LilyPond with English messages" enabled in the > > Preferences. This problem is known for some time already, but > > I didn't see an issue in the Frescobaldi tracker, so I just > > opened one: > > > > https://github.com/frescobaldi/frescobaldi/issues/1438 > > > > The workaround is to uncheck "Run LilyPond with English messages" > > in Edit > Preferences > LilyPond Preferences. > > > > Best, > > Jean > > > > No, I get the same error running lilypond from the command line: > > $ lilypond --png tést.ly > GNU LilyPond 2.23.9 (running Guile 2.2) > warning: cannot find file: `t??st.ly' > fatal error: failed files: "t??st.ly” > > David F. > > Being on Ubuntu 20.04.4 all works fine with 2.23.9 and current master. Cheers, Harm
Re: UTF-8 characters in filenames with Lilypond 2.23
> On May 21, 2022, at 5:01 PM, Jean Abou Samra wrote: > > Le 21/05/2022 à 23:20, David F. a écrit : >> System: Intel-based macOS >> >> I make extensive use of UTF-8 characters in the filenames of my Lilypond >> files. This works in Lilypond up through version 2.22. But Lilypond 2.23 >> cannot handle UTF-8 characters in filenames. >> >> Filename: tést.ly >> >> \version "2.22" >> >> { c' } >> >> >> Under v2.22, this file complies without problem. With 2.23 (including the >> just release 2.23.9) I get the following error: >> >> Starting lilypond 2.23.9 [tést.ly]... >> warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' >> fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" >> Exited with return code 1. >> >> I thought that this problem had already been reported, but I can’t find any >> mention of it now. So I’m reporting it. >> >> David F. > > > This is actually not an issue with LilyPond, but with Frescobaldi, > when you have "run LilyPond with English messages" enabled in the > Preferences. This problem is known for some time already, but > I didn't see an issue in the Frescobaldi tracker, so I just > opened one: > > https://github.com/frescobaldi/frescobaldi/issues/1438 > > The workaround is to uncheck "Run LilyPond with English messages" > in Edit > Preferences > LilyPond Preferences. > > Best, > Jean > No, I get the same error running lilypond from the command line: $ lilypond --png tést.ly GNU LilyPond 2.23.9 (running Guile 2.2) warning: cannot find file: `t??st.ly' fatal error: failed files: "t??st.ly” David F.
Re: UTF-8 characters in filenames with Lilypond 2.23
Le 21/05/2022 à 23:20, David F. a écrit : System: Intel-based macOS I make extensive use of UTF-8 characters in the filenames of my Lilypond files. This works in Lilypond up through version 2.22. But Lilypond 2.23 cannot handle UTF-8 characters in filenames. Filename: tést.ly \version "2.22" { c' } Under v2.22, this file complies without problem. With 2.23 (including the just release 2.23.9) I get the following error: Starting lilypond 2.23.9 [tést.ly]... warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" Exited with return code 1. I thought that this problem had already been reported, but I can’t find any mention of it now. So I’m reporting it. David F. This is actually not an issue with LilyPond, but with Frescobaldi, when you have "run LilyPond with English messages" enabled in the Preferences. This problem is known for some time already, but I didn't see an issue in the Frescobaldi tracker, so I just opened one: https://github.com/frescobaldi/frescobaldi/issues/1438 The workaround is to uncheck "Run LilyPond with English messages" in Edit > Preferences > LilyPond Preferences. Best, Jean
UTF-8 characters in filenames with Lilypond 2.23
System: Intel-based macOS I make extensive use of UTF-8 characters in the filenames of my Lilypond files. This works in Lilypond up through version 2.22. But Lilypond 2.23 cannot handle UTF-8 characters in filenames. Filename: tést.ly \version "2.22" { c' } Under v2.22, this file complies without problem. With 2.23 (including the just release 2.23.9) I get the following error: Starting lilypond 2.23.9 [tést.ly]... warning: cannot find file: `/Users/david/Projects/Lily Scratch/te??st.ly' fatal error: failed files: "/Users/david/Projects/Lily Scratch/te??st.ly" Exited with return code 1. I thought that this problem had already been reported, but I can’t find any mention of it now. So I’m reporting it. David F.
Re: UTF-8 unicode use in \markup
Thank you very much. Helpful information. Sent from my iPhone > On Nov 28, 2021, at 7:39 PM, Valentin Petzel wrote: > > Just for clarification: > > 00a7 is not a special code, but a hexadecimal number. Basically any unicode > char is linked with a number, and the „code” is just this number in > hexadecimal digits. > > U+ is just a way to specify that a hexadecimal number stands for a > unicode > char. In our case that function is taken by char. #xSOMETHING is just a guile > way of entering numbers as hexadecimal. So instead of ##x00a7 you can also do > ##xa7 as well as simply 167 (which is the decimal numeric value for hex A7). > > Thus char basically takes a number and gives us that unicode character. > > Cheers, > Valentin > > Am Montag, 29. November 2021, 01:27:37 CET schrieb ming tsang: >> Hi Valentin Petzel, >> Thank you for your reply. I found a >> UTF-8 encoding table and Unicode characters >> https://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=0x >> Now I can look up the U+00a7 and then use \markup { \char ##x00a7 ) to >> display it. >> for \char I cannot use unicode U+00a7. I was hoping \char could accept >> U+00a7. Now I can use ##x00a7. >> Thank you for your info. >> Shalom, >> yMing. >> >>> On Sun, Nov 28, 2021 at 5:16 PM Valentin Petzel wrote: >>> Hello Ming, >>> >>> I do not understand your exact problem. If you want to have € in markup >>> you >>> can either directly put € in the markup, or use \char ##20ac. >>> >>> Valentin >>> >>> Am Sonntag, 28. November 2021, 22:42:47 CET schrieb ming tsang: >>>> Hi lilyponder, >>>> >>>> I would like to use \markup to display € using U+20AC. I can use >>> >>> \markup >>> >>>> { \char ##x2197 } to display / print / output to pdf. ##x2197 is >>>> [image: image.png] >>>> >>>> Your help is appreciated. >>>> >>>> Shalom, >>>> yMing
Re: UTF-8 unicode use in \markup
Just for clarification: 00a7 is not a special code, but a hexadecimal number. Basically any unicode char is linked with a number, and the „code” is just this number in hexadecimal digits. U+ is just a way to specify that a hexadecimal number stands for a unicode char. In our case that function is taken by char. #xSOMETHING is just a guile way of entering numbers as hexadecimal. So instead of ##x00a7 you can also do ##xa7 as well as simply 167 (which is the decimal numeric value for hex A7). Thus char basically takes a number and gives us that unicode character. Cheers, Valentin Am Montag, 29. November 2021, 01:27:37 CET schrieb ming tsang: > Hi Valentin Petzel, > Thank you for your reply. I found a > UTF-8 encoding table and Unicode characters > https://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=0x > Now I can look up the U+00a7 and then use \markup { \char ##x00a7 ) to > display it. > for \char I cannot use unicode U+00a7. I was hoping \char could accept > U+00a7. Now I can use ##x00a7. > Thank you for your info. > Shalom, > yMing. > > On Sun, Nov 28, 2021 at 5:16 PM Valentin Petzel wrote: > > Hello Ming, > > > > I do not understand your exact problem. If you want to have € in markup > > you > > can either directly put € in the markup, or use \char ##20ac. > > > > Valentin > > > > Am Sonntag, 28. November 2021, 22:42:47 CET schrieb ming tsang: > > > Hi lilyponder, > > > > > > I would like to use \markup to display € using U+20AC. I can use > > > > \markup > > > > > { \char ##x2197 } to display / print / output to pdf. ##x2197 is > > > [image: image.png] > > > > > > Your help is appreciated. > > > > > > Shalom, > > > yMing signature.asc Description: This is a digitally signed message part.
Re: UTF-8 unicode use in \markup
Hi Valentin Petzel, Thank you for your reply. I found a UTF-8 encoding table and Unicode characters https://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=0x Now I can look up the U+00a7 and then use \markup { \char ##x00a7 ) to display it. for \char I cannot use unicode U+00a7. I was hoping \char could accept U+00a7. Now I can use ##x00a7. Thank you for your info. Shalom, yMing. On Sun, Nov 28, 2021 at 5:16 PM Valentin Petzel wrote: > Hello Ming, > > I do not understand your exact problem. If you want to have € in markup > you > can either directly put € in the markup, or use \char ##20ac. > > Valentin > > Am Sonntag, 28. November 2021, 22:42:47 CET schrieb ming tsang: > > Hi lilyponder, > > > > I would like to use \markup to display € using U+20AC. I can use > \markup > > { \char ##x2197 } to display / print / output to pdf. ##x2197 is > > [image: image.png] > > > > Your help is appreciated. > > > > Shalom, > > yMing -- ming (lyndon) tsang
Re: UTF-8 unicode use in \markup
Hello Ming, I do not understand your exact problem. If you want to have € in markup you can either directly put € in the markup, or use \char ##20ac. Valentin Am Sonntag, 28. November 2021, 22:42:47 CET schrieb ming tsang: > Hi lilyponder, > > I would like to use \markup to display € using U+20AC. I can use \markup > { \char ##x2197 } to display / print / output to pdf. ##x2197 is > [image: image.png] > > Your help is appreciated. > > Shalom, > yMing signature.asc Description: This is a digitally signed message part.
UTF-8 unicode use in \markup
Hi lilyponder, I would like to use \markup to display € using U+20AC. I can use \markup { \char ##x2197 } to display / print / output to pdf. ##x2197 is [image: image.png] Your help is appreciated. Shalom, yMing -- ming (lyndon) tsang
Re: utf-8 file name in lilypond
> On 30 Jan 2019, at 20:27, David Wright wrote: > > On Wed 30 Jan 2019 at 16:42:22 (+), MING TSANG wrote: >> http://lsr.di.unimi.it/LSR/Snippet?id=197 >> >> I copy the above snippet and name it test_file-name_info.ly and run with >> fracobaldi3.01 + lilypond2.19.82 it produces desired file infomation. >> Then I rename the file as test_中文.ly (UTF-8 Chinese characters) and execute >> and the following error occurs: >> Starting lilypond-windows.exe 2.19.82 [test_中文.ly]... >> warning: cannot find file: `C:/Users/yming/Documents/test_??.ly' >> >> fatal error: failed files: "C:/Users/yming/Documents/test_??.ly" >> >> Exited with return code 1. >> >> Question: Window 10 support UTF-8 file name and lilypond does not. Is there >> any work around? > > That snippet puts the filename into the score, doesn't it? > Have you ever had this working or is this effectively a repeat of > http://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00325.html FYI, on MacOS, the error is as below: Guile makes a translation error. If the second CJK character is deleted from the filename, then it compiles without this error. -- $ lilypond 'test_中文.ly' GNU LilyPond 2.19.82 Processing `test_中文.ly' Parsing... test_中文.ly:10:2: error: GUILE signaled an error for the expression beginning here # (define siz (object->string (stat:size (stat filen No such file or directory: "test_中?\\x87.ly" test_中文.ly:14:2: error: GUILE signaled an error for the expression beginning here # (define modt (stat:mtime (stat filen))) No such file or directory: "test_中?\\x87.ly" test_中文.ly:15:2: error: GUILE signaled an error for the expression beginning here # … -- ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 file name in lilypond
On Wed 30 Jan 2019 at 16:42:22 (+), MING TSANG wrote: > http://lsr.di.unimi.it/LSR/Snippet?id=197 > > I copy the above snippet and name it test_file-name_info.ly and run with > fracobaldi3.01 + lilypond2.19.82 it produces desired file infomation. > Then I rename the file as test_中文.ly (UTF-8 Chinese characters) and execute > and the following error occurs: > Starting lilypond-windows.exe 2.19.82 [test_中文.ly]... > warning: cannot find file: `C:/Users/yming/Documents/test_??.ly' > > fatal error: failed files: "C:/Users/yming/Documents/test_??.ly" > > Exited with return code 1. > > Question: Window 10 support UTF-8 file name and lilypond does not. Is there > any work around? That snippet puts the filename into the score, doesn't it? Have you ever had this working or is this effectively a repeat of http://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00325.html Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
utf-8 file name in lilypond
http://lsr.di.unimi.it/LSR/Snippet?id=197 I copy the above snippet and name it test_file-name_info.ly and run with fracobaldi3.01 + lilypond2.19.82 it produces desired file infomation. Then I rename the file as test_中文.ly (UTF-8 Chinese characters) and execute and the following error occurs: Starting lilypond-windows.exe 2.19.82 [test_中文.ly]... warning: cannot find file: `C:/Users/yming/Documents/test_??.ly' fatal error: failed files: "C:/Users/yming/Documents/test_??.ly" Exited with return code 1. Question: Window 10 support UTF-8 file name and lilypond does not. Is there any work around?___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8-aware backwards string searching in Guile, or: fixing centered lyrics ignoring punctuation
Gosh, once again I'm flabbergasted about the expertise and helpfulness of the folks on this list. Thanks a ton! As far as I can tell, your corrected version works like a charm (and even fixed a minor misalignment of the "à" syllable that I did not spot earlier). And IIUC, the only drawback of the quick'n'dirty variant is that it does not actually do a canonicalization of the strings involved, so that two different representations of a glyph (e.g., using different combining characters) will not match. But this is extremely unlikely given that they should be usually entered by the same user in the same way, and that the set of characters to compare with is fairly limited and probably even has a unique encoding anyway. So, problem solved for me. I can only hope that you did not spend the 4.75 hours between your mails for the "quick fix"... Cheers, Alex On 31/10/2018 05.23, Aaron Hill wrote: On 2018-10-30 4:56 pm, Aaron Hill wrote: On 2018-10-30 10:01 am, Alexander Kobel wrote: Does anyone have a hint how to approach this one? (Or is the answer just: be patient and hope for Guile v2?) The only hint here is to replace the built-in functions with ones which understand UTF8 encoding and can perform the work needed. There very well might be someone online who has already done this work, which would save on having to do it yourself. Otherwise, the basic strategy is to replace string->list with a version that decodes UTF8 and returns a list of integers (essentially UTF32). Then, all of the string work is being done with these lists of integers instead. (The character set would also just be a set of integers representing the unique Unicode code points.) After you find the subsets of the list that are interesting to measure, you'll then need to convert the list back into a string. This means encoding back into UTF8 and emitting a string. Here's a quick-n-dirty patch to address the issue. \version "2.19.82" \include "center-lyrics-ignoring-punctuation.ily" { d'4 4 4 } \addlyrics { Å Ɓ† «Ḉ…» } -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user smime.p7s Description: S/MIME Cryptographic Signature ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8-aware backwards string searching in Guile, or: fixing centered lyrics ignoring punctuation
On 2018-10-30 9:23 pm, Aaron Hill wrote: Here's a quick-n-dirty patch to address the issue. \version "2.19.82" \include "center-lyrics-ignoring-punctuation.ily" { d'4 4 4 } \addlyrics { Å Ɓ† «Ḉ…» } Agh, I goofed. I forgot the logic is that you want to trim the "space" characters from the ends only. Anything included within the "word" is okay. So with two drop-whiles and reverses, here's the patch to my patch, including a new test document: \version "2.19.82" \include "center-lyrics-ignoring-punctuation.ily" { d'4 4 4 4 } \addlyrics { Å Ɓ† «Ḉ…» ?Ḓ—Ḛ } -- Aaron Hill\version "2.19.50" %% and higher %% https://lists.gnu.org/archive/html/lilypond-user/2016-12/msg00382.html %% http://lsr.di.unimi.it/LSR/Item?id=888 %% Including UTF8 workaround - see the following... %% http://lists.gnu.org/archive/html/lilypond-user/2018-10/msg00468.html #(define (utf8->utf32 lst) "Converts a list of UTF8-encoded characters into UTF32." (if (null? lst) '() (let ((ch (char->integer (car lst (cond ;; Characters 0x00-0x7F ((< ch #b1000) (cons ch (utf8->utf32 (cdr lst ;; Characters 0x80-0x7FF ((eqv? (logand ch #b1110) #b1100) (cons (let ((ch2 (char->integer (cadr lst (logior (ash (logand ch #b1) 6) (logand ch2 #b11))) (utf8->utf32 (cddr lst ;; Characters 0x800-0x ((eqv? (logand ch #b) #b1110) (cons (let ((ch2 (char->integer (cadr lst))) (ch3 (char->integer (caddr lst (logior (ash (logand ch #b) 12) (ash (logand ch2 #b11) 6) (logand ch3 #b11))) (utf8->utf32 (cdddr lst ;; Characters 0x1-0x10 ((eqv? (logand ch #b1) #b) (cons (let ((ch2 (char->integer (cadr lst))) (ch3 (char->integer (caddr lst))) (ch4 (char->integer (cadddr lst (logior (ash (logand ch #b111) 18) (ash (logand ch2 #b11) 12) (ash (logand ch3 #b11) 6) (logand ch4 #b11))) (utf8->utf32 (cr lst ;; Ignore orphaned continuation characters ((eqv? (logand ch #b1100) #b1000) (utf8->utf32 (cdr lst))) ;; Error on all else (else (error "Unexpected character:" ch)) #(define (utf32->utf8 lst) "Converts a list of UTF32-encoded characters into UTF8." (if (null? lst) '() (let ((ch (car lst))) (append (cond ;; Characters 0x00-0x7F ((< ch #x80) (list (integer->char ch))) ;; Characters 0x80-0x7FF ((< ch #x800) (list (integer->char (logior #b1100 (logand (ash ch -6) #b1))) (integer->char (logior #b1000 (logand ch #b11) ;; Characters 0x800-0x ((< ch #x1) (list (integer->char (logior #b1110 (logand (ash ch -12) #b))) (integer->char (logior #b1000 (logand (ash ch -6) #b11))) (integer->char (logior #b1000 (logand ch #b11) ;; Characters 0x1-0x10 (else (list (integer->char (logior #b (logand (ash ch -18) #b111))) (integer->char (logior #b1000 (logand (ash ch -12) #b11))) (integer->char (logior #b1000 (logand (ash ch -6) #b11))) (integer->char (logior #b1000 (logand ch #b11)) (utf32->utf8 (cdr lst)) #(define (string->utf32 s) (utf8->utf32 (string->list s))) #(define (utf32->string l) (list->string (utf32->utf8 l))) #(define space-set (string->utf32 ".?-;,:ââââ«»â¹âºããããââââââ */()[]{}|<>!`~&â¦â â¡")) #(define (is-space? x) (member x space-set)) #(define (width grob text) (let* ((X-extent (ly:stencil-extent (grob-interpret-markup grob text) X))) (if (interval-empty? X-extent) 0 (cdr X-extent #(define (remove-suspended-note-heads stem note-heads) (let* ((nc (ly:grob-common-refpoint stem (car note-heads) X)) (stem-coord (ly:grob-relative-coordinate stem stem X)) (half-stem-thick (/ (ly:grob-property stem 'thickness) 2)) (stem-dir (ly:grob-property stem 'direction))) (remove (lambda (nh) (if (positive? stem-dir) (> (ly:grob-relative-coordinate nh nc X) stem-coord) (< (ly:grob-relative-coordinate nh nc X) (- stem-coord half-stem-thick note-heads))) #(define (make-center-on-word-callback grob center-on-chords) (let* ((text (ly:grob-property-data grob 'text)) (syllable (markup->string text)) (utf32 (string->utf32 syllable)) (preword (utf32->string (take-while is-space?
Re: UTF-8-aware backwards string searching in Guile, or: fixing centered lyrics ignoring punctuation
On 2018-10-30 4:56 pm, Aaron Hill wrote: On 2018-10-30 10:01 am, Alexander Kobel wrote: Does anyone have a hint how to approach this one? (Or is the answer just: be patient and hope for Guile v2?) The only hint here is to replace the built-in functions with ones which understand UTF8 encoding and can perform the work needed. There very well might be someone online who has already done this work, which would save on having to do it yourself. Otherwise, the basic strategy is to replace string->list with a version that decodes UTF8 and returns a list of integers (essentially UTF32). Then, all of the string work is being done with these lists of integers instead. (The character set would also just be a set of integers representing the unique Unicode code points.) After you find the subsets of the list that are interesting to measure, you'll then need to convert the list back into a string. This means encoding back into UTF8 and emitting a string. Here's a quick-n-dirty patch to address the issue. \version "2.19.82" \include "center-lyrics-ignoring-punctuation.ily" { d'4 4 4 } \addlyrics { Å Ɓ† «Ḉ…» } -- Aaron Hill\version "2.19.50" %% and higher %% https://lists.gnu.org/archive/html/lilypond-user/2016-12/msg00382.html %% http://lsr.di.unimi.it/LSR/Item?id=888 %% Including UTF8 workaround - see the following... %% http://lists.gnu.org/archive/html/lilypond-user/2018-10/msg00468.html #(define (utf8->utf32 lst) "Converts a list of UTF8-encoded characters into UTF32." (if (null? lst) '() (let ((ch (char->integer (car lst (cond ;; Characters 0x00-0x7F ((< ch #b1000) (cons ch (utf8->utf32 (cdr lst ;; Characters 0x80-0x7FF ((eqv? (logand ch #b1110) #b1100) (cons (let ((ch2 (char->integer (cadr lst (logior (ash (logand ch #b1) 6) (logand ch2 #b11))) (utf8->utf32 (cddr lst ;; Characters 0x800-0x ((eqv? (logand ch #b) #b1110) (cons (let ((ch2 (char->integer (cadr lst))) (ch3 (char->integer (caddr lst (logior (ash (logand ch #b) 12) (ash (logand ch2 #b11) 6) (logand ch3 #b11))) (utf8->utf32 (cdddr lst ;; Characters 0x1-0x10 ((eqv? (logand ch #b1) #b) (cons (let ((ch2 (char->integer (cadr lst))) (ch3 (char->integer (caddr lst))) (ch4 (char->integer (cadddr lst (logior (ash (logand ch #b111) 18) (ash (logand ch2 #b11) 12) (ash (logand ch3 #b11) 6) (logand ch4 #b11))) (utf8->utf32 (cr lst ;; Ignore orphaned continuation characters ((eqv? (logand ch #b1100) #b1000) (utf8->utf32 (cdr lst))) ;; Error on all else (else (error "Unexpected character:" ch)) #(define (utf32->utf8 lst) "Converts a list of UTF32-encoded characters into UTF8." (if (null? lst) '() (let ((ch (car lst))) (append (cond ;; Characters 0x00-0x7F ((< ch #x80) (list (integer->char ch))) ;; Characters 0x80-0x7FF ((< ch #x800) (list (integer->char (logior #b1100 (logand (ash ch -6) #b1))) (integer->char (logior #b1000 (logand ch #b11) ;; Characters 0x800-0x ((< ch #x1) (list (integer->char (logior #b1110 (logand (ash ch -12) #b))) (integer->char (logior #b1000 (logand (ash ch -6) #b11))) (integer->char (logior #b1000 (logand ch #b11) ;; Characters 0x1-0x10 (else (list (integer->char (logior #b (logand (ash ch -18) #b111))) (integer->char (logior #b1000 (logand (ash ch -12) #b11))) (integer->char (logior #b1000 (logand (ash ch -6) #b11))) (integer->char (logior #b1000 (logand ch #b11)) (utf32->utf8 (cdr lst)) #(define (string->utf32 s) (utf8->utf32 (string->list s))) #(define (utf32->string l) (list->string (utf32->utf8 l))) #(define space-set (string->utf32 ".?-;,:ââââ«»â¹âºããããââââââ */()[]{}|<>!`~&â¦â â¡")) #(define (is-space? x) (member x space-set)) #(define (width grob text) (let* ((X-extent (ly:stencil-extent (grob-interpret-markup grob text) X))) (if (interval-empty? X-extent) 0 (cdr X-extent #(define (remove-suspended-note-heads stem note-heads) (let* ((nc (ly:grob-common-refpoint stem (car note-heads) X)) (stem-coord (ly:grob-relative-coordinate stem stem X)) (half-stem-thick (/ (ly:grob-property stem 'thickness) 2)) (stem-dir
Re: UTF-8-aware backwards string searching in Guile, or: fixing centered lyrics ignoring punctuation
On 2018-10-30 10:01 am, Alexander Kobel wrote: This makes me wonder whether the problem is in the backwards string-search in string-skip-right or in the substring routine used in the make-center-on-word-callback; the only reason I can imagine why this pops up is that some blind-to-Unicode slicing cuts some string in the middle of a multi-byte Unicode character. It's a little of both. Near as I can tell, proper Unicode support was only added in Guile 2.0. So 1.8 only thinks of characters as 8-bit values. While a UTF8-encoded string can be represented, none of the built-in character- or string-handling routines in 1.8 understand that encoding directly. For instance, the code you posted contains a mistake in defining the character set for punctuation symbols. string->list will convert a string into individual characters, but remember that 1.8 doesn't understand anything beyond ASCII. As such, the following string: .?-;,:„“‚‘«»‹›『』「」“”‘’–— */()[]{}|<>!`~&…†‡ gets converted into the following list: (#\. #\? #\- #\; #\, #\: #\342 #\200 #\236 #\342 #\200 #\234 #\342 #\200 #\232 #\342 #\200 #\230 #\302 #\253 #\302 #\273 #\342 #\200 #\271 #\342 #\200 #\272 #\343 #\200 #\216 #\343 #\200 #\217 #\343 #\200 #\214 #\343 #\200 #\215 #\342 #\200 #\234 #\342 #\200 #\235 #\342 #\200 #\230 #\342 #\200 #\231 #\342 #\200 #\223 #\342 #\200 #\224 #\space #\* #\/ #\( #\) #\[ #\] #\{ #\} #\| #\< #\> #\! #\` #\~ #\& #\342 #\200 #\246 #\342 #\200 #\240 #\342 #\200 #\241) The resulting character set is then just the unique individual bytes, not the original characters which may have been composed of two or more surrogates: # #\? #\[ #\] #\` #\{ #\| #\} #\~ #\200 #\214 #\215 #\216 #\217 #\223 #\224 #\230 #\231 #\232 #\234 #\235 #\236 #\240 #\241 #\246 #\253 #\271 #\272 #\273 #\302 #\342 #\343}> The result is something that may at first glance appear to handle things, since what is happening is that the logic is stripping away individual bytes from the left and right ends of the string. When you have a leading or trailing symbol that was in the list, then its individual bytes are stripped properly. However, if you include a character that just so happens to begin with or end with one of these bytes, then it will be split improperly. In your example, "à" is encoded as #\303 #\240. But take note of #\240 which is in the character set. It was included in the set because of "†" which is encoded as #\342 #\200 #\240. If you were to remove "†" from the list of symbols, you'd find that the warning will go away, because #\240 is no longer being stripped. Does anyone have a hint how to approach this one? (Or is the answer just: be patient and hope for Guile v2?) The only hint here is to replace the built-in functions with ones which understand UTF8 encoding and can perform the work needed. There very well might be someone online who has already done this work, which would save on having to do it yourself. Otherwise, the basic strategy is to replace string->list with a version that decodes UTF8 and returns a list of integers (essentially UTF32). Then, all of the string work is being done with these lists of integers instead. (The character set would also just be a set of integers representing the unique Unicode code points.) After you find the subsets of the list that are interesting to measure, you'll then need to convert the list back into a string. This means encoding back into UTF8 and emitting a string. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
UTF-8-aware backwards string searching in Guile, or: fixing centered lyrics ignoring punctuation
Dear all, I'm happily using center-lyrics-ignoring-punctuation.ily in the version from https://lists.gnu.org/archive/html/lilypond-user/2016-12/msg00382.html for a while now. (It's attached as well.) Now I stumbled across the following unexpected warning: \version "2.19.82" \include "center-lyrics-ignoring-punctuation.ily" { d4 } \addlyrics { à } GNU LilyPond 2.19.82 Processing `test.ly' Parsing... Interpreting music... Preprocessing graphical objects... (process:2528): Pango-WARNING **: 17:49:34.874: Invalid UTF-8 string passed to pango_layout_set_text() warning: no glyph for character U+FFFD in font `/usr/share/fonts/tex-gyre/texgyreschola-regular.otf' Observations: 1. The warning vanishes as soon as I replace the lyrics by àa, but not by aà. 2. There is no U+FFFD (REPLACEMENT CHARACTER) anywhere in my input. This makes me wonder whether the problem is in the backwards string-search in string-skip-right or in the substring routine used in the make-center-on-word-callback; the only reason I can imagine why this pops up is that some blind-to-Unicode slicing cuts some string in the middle of a multi-byte Unicode character. The warning is merely annoying, but harmless; but I suspect that there are unfortunate combinations where trailing "to-be-ignored" characters are missed, or "not-to-be-ignored" characters are split into an ill-defined character and a false "to-be-ignored". Does anyone have a hint how to approach this one? (Or is the answer just: be patient and hope for Guile v2?) Thanks, Alex \version "2.19.50" %% and higher %% https://lists.gnu.org/archive/html/lilypond-user/2016-12/msg00382.html %% http://lsr.di.unimi.it/LSR/Item?id=888 #(define space-set (list->char-set (string->list ".?-;,:„“‚‘«»‹›『』「」“”‘’–— */()[]{}|<>!`~&…†‡"))) #(define (width grob text) (let* ((X-extent (ly:stencil-extent (grob-interpret-markup grob text) X))) (if (interval-empty? X-extent) 0 (cdr X-extent #(define (remove-suspended-note-heads stem note-heads) (let* ((nc (ly:grob-common-refpoint stem (car note-heads) X)) (stem-coord (ly:grob-relative-coordinate stem stem X)) (half-stem-thick (/ (ly:grob-property stem 'thickness) 2)) (stem-dir (ly:grob-property stem 'direction))) (remove (lambda (nh) (if (positive? stem-dir) (> (ly:grob-relative-coordinate nh nc X) stem-coord) (< (ly:grob-relative-coordinate nh nc X) (- stem-coord half-stem-thick note-heads))) #(define (make-center-on-word-callback grob center-on-chords) (let* ((text (ly:grob-property-data grob 'text)) (syllable (markup->string text)) (word-position (if (string-skip syllable space-set) (string-skip syllable space-set) 0)) (word-end (if (string-skip-right syllable space-set) (+ (string-skip-right syllable space-set) 1) (string-length syllable))) (preword (substring syllable 0 word-position)) (word (substring syllable word-position word-end)) (preword-width (width grob preword)) (word-width (width grob (if (string-null? syllable) text word))) (note-column (ly:grob-parent grob X)) (stem (ly:grob-object note-column 'stem)) (stem-dir (ly:grob-property stem 'direction)) (sys (ly:grob-system grob)) (nh-ls (if (ly:grob-array? (ly:grob-object note-column 'note-heads)) (ly:grob-array->list (ly:grob-object note-column 'note-heads)) '())) (full-column-width (interval-length (ly:relative-group-extent nh-ls note-column X))) (note-column-width (interval-length (ly:relative-group-extent (remove-suspended-note-heads stem nh-ls) note-column X (- (* (/ (if center-on-chords (if (positive? stem-dir) (- full-column-width word-width) (- (* 2 note-column-width) full-column-width word-width)) (- note-column-width word-width)) 2) (1+ (ly:grob-property-data grob 'self-alignment-X))) preword-width))) #(define (center-on-word grob) (make-center-on-word-callback grob #f)) #(define (center-on-word-on-chords grob) (make-center-on-word-callback grob #t)) \layout { \context { \Lyrics \override LyricText #'X-offset = #center-on-word-on-chords } } \version "2.19.82" \include "center-lyrics-ignoring-punctuation.ily" { d4 } \addlyrics { à } smime.p7s Description: S/MIME Cryptographic Signature ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 in MIDI Lyrics
Joseph Austin: > > From: Karl Hammar <k...@opal.lcl.aspodata.se > > <mailto:k...@opal.lcl.aspodata.se>> ... > >> But if we are going to use a "private standard", we might as well > >> imitate the "official" standard and insert something like > >> FF 05 07 { @ U T F 8 } > >> And lobby AMEI/MMA to adopt an official UTF8 position. > > > > Could be good, but why just not capitalize on the BOM and just use > > utf8. ... > OK, the UTF-8 BOM is 0x EF BB BF > But given that the MIDI file is not a "text file" but a binary > file with text fields scattered throughout, > normally embedded in various MIDI Meta-events, where should the BOM > be placed? > > Interpreting your suggestion, we could add a Lyric Meta-Event with > the BOM as the text field to Track 0 Time 0. > That should work for lyrics, but RP-26 indicates that lyrics > "language encoding" should not extend to other types of text events. > For other text events, it seems we would need to prefix every UTF-8 > text field with the BOM. Unfortunately midi-file standard and rp26 doesn't help you with that. The only fallback we have is the notice that you can use extended charset, but you have to check that programs at the other end of the pipe does something reasonable with it. And all this boils down to how do programs out there interpret any extended char, do they support utf8 BOM, do they support rp26 ? Well, I don't know. >From reading rp26, it only talks about latin (latin-1 I assume), ms-kanji and utf16* (which has the boms "FFFE", "FEFF"), so I don't think we can expect anything more. Utf16 points to MS-Windows, what programs makes midi files on that os, how to they do it ? Soo in the end, I think we should just use utf8 and wait and see if any bug reports comes in about it. But as you suggest, we could talk to the midi assosiation to amend the standard. The easiest would be if they replaced the word "ascii" with "utf8". Regards, /Karl Hammar --- Asp� Data Lilla Asp� 148 S-742 94 �sthammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 in MIDI Lyrics
> On Feb 25, 2017, at 11:41 AM, lilypond-user-requ...@gnu.org wrote: > > Date: Sat, 25 Feb 2017 17:34:54 +0100 (CET) > From: Karl Hammar <k...@opal.lcl.aspodata.se > <mailto:k...@opal.lcl.aspodata.se>> > To: Joseph Austin <drtechda...@gmail.com <mailto:drtechda...@gmail.com>> > > > And, rp26 clearly states in section 5: > > In addition, if a byte order mark which specifies UNICODE such as > 'FF FE' or 'FE FF' exists, the character code SET should be treated > as UNICODE. > > There is such a "byte order mark" for utf8, see [2]. And then by > extension, you just have to insert that BOM somewhere in the midi > file (exists == not restricted to the lyrics meta event, preferable > in track 0 at time 0) and it would be legal (according to the > recommendation) to use utf8 straigth out the box. > > [2] http://www.unicode.org/faq/utf_bom.html#BOM > <http://www.unicode.org/faq/utf_bom.html#BOM> > > > >> only ASCII chars between 0 and 127 are allowed. > > Your wording is too hard. complete_midi_96-1-3.pdf, p.137 (or [1] > p.10) clearly says "should", but > > "other characters codes > using the high-order bit may be used for interchange of files between > different programs on the same computer which supports an extended > character set. Programs on a computer which does not support > non-ASCII characters should ignore those characters." I stand corrected. >> But if we are going to use a "private standard", we might as well >> imitate the "official" standard and insert something like >> FF 05 07 { @ U T F 8 } >> And lobby AMEI/MMA to adopt an official UTF8 position. > > Could be good, but why just not capitalize on the BOM and just use > utf8. > > Regards, > /Karl Hammar OK, the UTF-8 BOM is 0x EF BB BF But given that the MIDI file is not a "text file" but a binary file with text fields scattered throughout, normally embedded in various MIDI Meta-events, where should the BOM be placed? Interpreting your suggestion, we could add a Lyric Meta-Event with the BOM as the text field to Track 0 Time 0. That should work for lyrics, but RP-26 indicates that lyrics "language encoding" should not extend to other types of text events. For other text events, it seems we would need to prefix every UTF-8 text field with the BOM. --- Joe Austin ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 in MIDI Lyrics
sorry, last mail wrong from header. Joe Austen: > > Am 24.02.2017 um 02:15 schrieb Joseph Austin: > >> This raises another question. I'm working with MIDI files, > >> and it's not clear how to encode UTF-8 text in MIDI. > >> There must be some convention, but I haven't found an official RP for it. ... > I don't have a program that displays MIDI files with lyrics, so I can't test > it. Timidity will show the lyrics. I have a simple program that dumps the midi as text: http://aspodata.se/git/musik/bin/midi.pl $ midi.pl test.midi | grep lyric | head ['lyric', 0, 'Sta'], ['lyric', 768, 'bat '], ['lyric', 768, 'Ma'], ['lyric', 768, 'ter '], ['lyric', 384, 'do'], ['lyric', 768, 'lo'], ['lyric', 384, 'ro'], ['lyric', 768, 'sa '], ['lyric', 384, 'sa '], ['lyric', 384, 'jux'], $ > It appears that, when generating a MIDI file, LilyPond currently > just puts UTF8 chars in the text fields as if they were ASCII. > According the base MIDI spec, this is illegal; only ASCII chars > between 0 and 127 are allowed. Your wording is too hard. complete_midi_96-1-3.pdf, p.137 (or [1] p.10) clearly says "should", but "other characters codes using the high-order bit may be used for interchange of files between different programs on the same computer which supports an extended character set. Programs on a computer which does not support non-ASCII characters should ignore those characters." [1] http://www.cdik.se/pdf/midiformat.pdf Also, rp17.pdf, last paragraph gives you the set that are "accepted for use" and that "it is best to avoid the use of these characters: \ [ ] { }". And, rp26 clearly states in section 5: In addition, if a byte order mark which specifies UNICODE such as 'FF FE' or 'FE FF' exists, the character code SET should be treated as UNICODE. There is such a "byte order mark" for utf8, see [2]. And then by extension, you just have to insert that BOM somewhere in the midi file (exists == not restricted to the lyrics meta event, preferable in track 0 at time 0) and it would be legal (according to the recommendation) to use utf8 straigth out the box. [2] http://www.unicode.org/faq/utf_bom.html#BOM > However, MIDI RP-17 and RP-26 introduce additional encodings for > the portion of the lyric meta-event FF 05 . You do extrapolate a litte, rp17 tells you the "recommended" way to specify end of word/line/paragraph, and gives you a list of characters that should give no compatibility problems. > In particular, RP-26 specifies the "language" code {@LATIN} to > include 8-bit chars > 127. It seems no code for "UTF8" has been > officially defined, but a reasonable proposal might be language code: > {@UTF8}. You don't need that, see above about BOM. Also it would be interesting to see which programs that actually support rp26. Since midi "standards" just are recommendations, you have to know what works in the wild. .. > So for LilyPond purposes, it would suffice to use a reversible > encoding, that is, LilyPond would accept any MIDI file text format > that LilyPond generates. The apparently existing UTF-8 default > should work for that. Lilypond don't read midi files, you can convert midi files to ly files, which then lilypond can read. > But if we are going to use a "private standard", we might as well > imitate the "official" standard and insert something like > FF 05 07 { @ U T F 8 } > And lobby AMEI/MMA to adopt an official UTF8 position. Could be good, but why just not capitalize on the BOM and just use utf8. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 in MIDI Lyrics
Joe Austen: > > Am 24.02.2017 um 02:15 schrieb Joseph Austin: > >> This raises another question. I'm working with MIDI files, > >> and it's not clear how to encode UTF-8 text in MIDI. > >> There must be some convention, but I haven't found an official RP for it. ... > I don't have a program that displays MIDI files with lyrics, so I can't test > it. Timidity will show the lyrics. I have a simple program that dumps the midi as text: http://aspodata.se/git/musik/bin/midi.pl $ midi.pl test.midi | grep lyric | head ['lyric', 0, 'Sta'], ['lyric', 768, 'bat '], ['lyric', 768, 'Ma'], ['lyric', 768, 'ter '], ['lyric', 384, 'do'], ['lyric', 768, 'lo'], ['lyric', 384, 'ro'], ['lyric', 768, 'sa '], ['lyric', 384, 'sa '], ['lyric', 384, 'jux'], $ > It appears that, when generating a MIDI file, LilyPond currently > just puts UTF8 chars in the text fields as if they were ASCII. > According the base MIDI spec, this is illegal; only ASCII chars > between 0 and 127 are allowed. Your wording is too hard. complete_midi_96-1-3.pdf, p.137 (or [1] p.10) clearly says "should", but "other characters codes using the high-order bit may be used for interchange of files between different programs on the same computer which supports an extended character set. Programs on a computer which does not support non-ASCII characters should ignore those characters." [1] http://www.cdik.se/pdf/midiformat.pdf Also, rp17.pdf, last paragraph gives you the set that are "accepted for use" and that "it is best to avoid the use of these characters: \ [ ] { }". And, rp26 clearly states in section 5: In addition, if a byte order mark which specifies UNICODE such as 'FF FE' or 'FE FF' exists, the character code SET should be treated as UNICODE. There is such a "byte order mark" for utf8, see [2]. And then by extension, you just have to insert that BOM somewhere in the midi file (exists == not restricted to the lyrics meta event, preferable in track 0 at time 0) and it would be legal (according to the recommendation) to use utf8 straigth out the box. [2] http://www.unicode.org/faq/utf_bom.html#BOM > However, MIDI RP-17 and RP-26 introduce additional encodings for > the portion of the lyric meta-event FF 05 . You do extrapolate a litte, rp17 tells you the "recommended" way to specify end of word/line/paragraph, and gives you a list of characters that should give no compatibility problems. > In particular, RP-26 specifies the "language" code {@LATIN} to > include 8-bit chars > 127. It seems no code for "UTF8" has been > officially defined, but a reasonable proposal might be language code: > {@UTF8}. You don't need that, see above about BOM. Also it would be interesting to see which programs that actually support rp26. Since midi "standards" just are recommendations, you have to know what works in the wild. .. > So for LilyPond purposes, it would suffice to use a reversible > encoding, that is, LilyPond would accept any MIDI file text format > that LilyPond generates. The apparently existing UTF-8 default > should work for that. Lilypond don't read midi files, you can convert midi files to ly files, which then lilypond can read. > But if we are going to use a "private standard", we might as well > imitate the "official" standard and insert something like > FF 05 07 { @ U T F 8 } > And lobby AMEI/MMA to adopt an official UTF8 position. Could be good, but why just not capitalize on the BOM and just use utf8. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 in MIDI Lyrics
> On Feb 24, 2017, at 7:47 AM, lilypond-user-requ...@gnu.org wrote: > > Am 24.02.2017 um 02:15 schrieb Joseph Austin: >> This raises another question. I'm working with MIDI files, >> and it's not clear how to encode UTF-8 text in MIDI. >> There must be some convention, but I haven't found an official RP for it. > > Personally, I have no idea. Does Lily not do it right? > Best, Simon I don't have a program that displays MIDI files with lyrics, so I can't test it. Both Finale and MuseScore accept LilyPond generated midi files but ignore the lyrics. It appears that, when generating a MIDI file, LilyPond currently just puts UTF8 chars in the text fields as if they were ASCII. According the base MIDI spec, this is illegal; only ASCII chars between 0 and 127 are allowed. However, MIDI RP-17 and RP-26 introduce additional encodings for the portion of the lyric meta-event FF 05 . In particular, RP-26 specifies the "language" code {@LATIN} to include 8-bit chars > 127. It seems no code for "UTF8" has been officially defined, but a reasonable proposal might be language code: {@UTF8}. It's my impression that the largest body of MIDI files with lyrics are "Karaoke" files (extension .kar), which may not be of interest to LilyPond. I suppose that interest in using MIDI as a "score" language has waned in favor of MusicXML. So for LilyPond purposes, it would suffice to use a reversible encoding, that is, LilyPond would accept any MIDI file text format that LilyPond generates. The apparently existing UTF-8 default should work for that. But if we are going to use a "private standard", we might as well imitate the "official" standard and insert something like FF 05 07 { @ U T F 8 } And lobby AMEI/MMA to adopt an official UTF8 position. Joe Austin ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 in MIDI lyrics
Simon Albrecht: > Am 24.02.2017 um 02:15 schrieb Joseph Austin: > > This raises another question. I'm working with MIDI files, > > and it's not clear how to encode UTF-8 text in MIDI. > > There must be some convention, but I haven't found an official RP for it. http://www.cdik.se/pdf/midiformat.pdf [...] Text events may also occur at other times in a track, to be used as lyrics, or descriptions of cue points. The text in this event should be printable ASCII characters for maximum interchange. However, other characters codes using the high-order bit may be used for interchange of files between different programs on the same computer which supports an extended character set. Programs on a computerwhich does not support non-ASCII characters should ignore those characters. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 in MIDI lyrics
Am 24.02.2017 um 02:15 schrieb Joseph Austin: This raises another question. I'm working with MIDI files, and it's not clear how to encode UTF-8 text in MIDI. There must be some convention, but I haven't found an official RP for it. Personally, I have no idea. Does Lily not do it right? Best, Simon P.S. If you can, please don’t top-post, but reply below the quotation (as I now did). That makes it far easier to catch up with to what you were replying. On Feb 23, 2017, at 4:36 PM, Simon Albrecht <simon.albre...@mail.de> wrote: Am 23.02.2017 um 01:57 schrieb David Wright: But why not do the Right Thing and dispose of this problem with \addlyrics { “I am so lone- ly” said she } and have yourself a proper set of 66 and 99 quotation marks without needing to enclose them in quotes. +1 Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 chars in included filenames on Windows 10 revisited
Reposted as Saturday night's email failed to post here and Sunday morning's did. (Their Bccs have both crossed the Atlantic in a timely manner.) On Sat 14 Jan 2017 at 11:17:17 (+0100), Michael Gerdau wrote: > it appears UTF-8 character in filenames on Windows seems to be a > recurring theme. I didn't know windows used UTF-8 at all in file names. I was under the impression that it used UTF-16, though I've no idea which endedness. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 chars in included filenames on Windows 10 revisited
On Sat 14 Jan 2017 at 11:17:17 (+0100), Michael Gerdau wrote: > it appears UTF-8 character in filenames on Windows seems to be a > recurring theme. I didn't know windows used UTF-8 at all in file names. I was under the impression that it used UTF-16, though I've no idea which endedness. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
UTF-8 chars in included filenames on Windows 10 revisited
Hi list, it appears UTF-8 character in filenames on Windows seems to be a recurring theme. The attached files placed into the same directory won't properly run on Windows 10 or Windows 7 while there is no problem at all on Linux (I suspect no problem on OSX either but haven't checked): test.ly %%% \version "2.19.54" \include "test-ä.ily" \score { \music } %%% test-ä.ily %%% \version "2.19.54" music = \absolute { c' } %%% I'm aware renaming 'test-ä.ily' to e.g. 'test-1.ily' (i.e. getting rid of the letter 'ä' in the filename) will make it work on Windows too. However I occasionally switch between Linux and Windows and would like to be able to use non ASCII letters in my filenames. Is there a way to make this work on Windows as well and how? Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver signature.asc Description: OpenPGP digital signature ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
On Thu 17 Nov 2016 at 02:56:01 (+), MING TSANG wrote: > Andrew,I have been using Chinese character in lyrics and there is no problem. > I only giving me trouble when I try to use Chinese characters in file > name.PDF , frecobaldi, lilypond all display Chinese characters without > problem. I think it the postscript. I am not sure.Immanuel,Ming Well, I thought that was last year's problem, but you said it's different this year. Have you tried changing the filename to ASCII to see if the problem goes away? Have you tried the suggestion I made last year that you set the problematic characters as an image and then include the image in the score? Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
On Thu 17 Nov 2016 at 01:35:36 (+), MING TSANG wrote: > David, > Thank you for the link.I forgot about it. it seems not the same to me. > previous:(lilypond.exe:1892): > Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' > current:(lilypond-windows.exe:8336): > Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' Well, you could try running the same program in the same version if you want to satisfy my curiosity as to whether the number following the name of the executable (whose significance is a mystery to me) would then be the same, 1892. But that might be difficult as you presumably weren't running ≥ 2.19.49 last year but would be now. > The conclusion previous is postscript. > Question:1. Is lilypond using the most updated postscript (PS)? Don't know. I kind of doubt it. You could try setting the target to PS instrad of PDF and then take a look. > 2. If not, when will lilybond updating the new PS No idea. What are the benefits for making any change needed? > - is new PS fixes the problem? What problem. You haven't diagnosed the problem yet. My crystal ball is not clear enough to see the source code that's giving this problem. All I've seen is an error message identical to the one from last year. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
Andrew,I have been using Chinese character in lyrics and there is no problem. I only giving me trouble when I try to use Chinese characters in file name.PDF , frecobaldi, lilypond all display Chinese characters without problem. I think it the postscript. I am not sure.Immanuel,Ming From: Andrew Bernard <andrew.bern...@gmail.com> To: 'MING TSANG' <tsan...@rogers.com>; lilypond-user@gnu.org Sent: Wednesday, November 16, 2016 8:59 PM Subject: RE: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() #yiv8425948074 #yiv8425948074 -- _filtered #yiv8425948074 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv8425948074 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv8425948074 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv8425948074 #yiv8425948074 p.yiv8425948074MsoNormal, #yiv8425948074 li.yiv8425948074MsoNormal, #yiv8425948074 div.yiv8425948074MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv8425948074 a:link, #yiv8425948074 span.yiv8425948074MsoHyperlink {color:blue;text-decoration:underline;}#yiv8425948074 a:visited, #yiv8425948074 span.yiv8425948074MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv8425948074 p.yiv8425948074msonormal0, #yiv8425948074 li.yiv8425948074msonormal0, #yiv8425948074 div.yiv8425948074msonormal0 {margin-right:0cm;margin-left:0cm;font-size:12.0pt;}#yiv8425948074 span.yiv8425948074EmailStyle18 {color:windowtext;}#yiv8425948074 .yiv8425948074MsoChpDefault {font-size:10.0pt;} _filtered #yiv8425948074 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv8425948074 div.yiv8425948074WordSection1 {}#yiv8425948074 Hello Ming, Well Unicode FFFD is the ‘replacement character’ which is the question mark in a black diamond used when a character cannot be found in a font. You typically see this on web pages. May have something to do with your use of Chinese? Andrew From: lilypond-user [mailto:lilypond-user-bounces+andrew.bernard=gmail@gnu.org] On Behalf Of MING TSANG Sent: Thursday, 17 November 2016 12:36 PM To: lilypond-user@gnu.org Subject: Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() David, Thank you for the link.I forgot about it. it seems not the same to me. previous:(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' current:(lilypond-windows.exe:8336): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' The conclusion previous is postscript.Question:1. Is lilypond using the most updated postscript (PS)?2. If not, when will lilybond updating the new PS - is new PS fixes the problem? Immanuel, ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
Hello Ming, Well Unicode FFFD is the ‘replacement character’ which is the question mark in a black diamond used when a character cannot be found in a font. You typically see this on web pages. May have something to do with your use of Chinese? Andrew From: lilypond-user [mailto:lilypond-user-bounces+andrew.bernard=gmail@gnu.org] On Behalf Of MING TSANG Sent: Thursday, 17 November 2016 12:36 PM To: lilypond-user@gnu.org Subject: Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() David, Thank you for the link. I forgot about it. it seems not the same to me. previous: (lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' current: (lilypond-windows.exe:8336): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' The conclusion previous is postscript. Question: 1. Is lilypond using the most updated postscript (PS)? 2. If not, when will lilybond updating the new PS - is new PS fixes the problem? Immanuel, ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
David, Thank you for the link.I forgot about it. it seems not the same to me. previous:(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' current:(lilypond-windows.exe:8336): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' The conclusion previous is postscript.Question:1. Is lilypond using the most updated postscript (PS)?2. If not, when will lilybond updating the new PS - is new PS fixes the problem? Immanuel,Ming From: David Wright <lily...@lionunicorn.co.uk> To: MING TSANG <tsan...@rogers.com> Cc: Lilypond-usermailinglist <lilypond-user@gnu.org> Sent: Wednesday, November 16, 2016 6:12 PM Subject: Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() On Wed 16 Nov 2016 at 21:38:45 (+), MING TSANG wrote: > Hi lilyponders, > I am running window 10 with lilypond v2.19.50 and frecobaldi 2.19.0 > 1. What is that mean? 2. Am I missing pango fonts?3. I search notation.pdf > 2.19.50 and cannot find a list of error message or warning + explaination > help appreciated. Dunno. Not much info. Perhaps reread: http://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00325.html et seq. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: (lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
On Wed 16 Nov 2016 at 21:38:45 (+), MING TSANG wrote: > Hi lilyponders, > I am running window 10 with lilypond v2.19.50 and frecobaldi 2.19.0 > 1. What is that mean? 2. Am I missing pango fonts?3. I search notation.pdf > 2.19.50 and cannot find a list of error message or warning + explaination > help appreciated. Dunno. Not much info. Perhaps reread: http://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00325.html et seq. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
(lilypond-windows.exe:6216): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
Hi lilyponders, I am running window 10 with lilypond v2.19.50 and frecobaldi 2.19.0 1. What is that mean? 2. Am I missing pango fonts?3. I search notation.pdf 2.19.50 and cannot find a list of error message or warning + explaination help appreciated. Immanuel,Ming___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Invalid UTF-8 string passed to pango_layout_set_text()
Hi, lilyponders: I ran the attach file and got the following.Question: can this be solved? How? Appreciate help given. Starting lilypond.exe 2.19.31 [test_ymt-曾煒明.ly]...Processing `K:/LILY_POND/test_ymt-��.ly'Parsing...Interpreting music...Preprocessing graphical objects...Finding the ideal number of pages...(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'Fitting music on 1 page...(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'Drawing systems...(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'(lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf'Layout output to `./tmp-lilypond-Q4O2W4'...Converting to `test_ymt-��.pdf'...Deleting `./tmp-lilypond-Q4O2W4'...Success: compilation successfully completedCompleted successfully in 1.9".\version "2.19.31" %\include "include_ymt.ily" %filename date = #(strftime "%Y-%m-%d" (localtime (current-time))) #( define comml( object->string (command-line ))) #( define loc ( + (string-rindex comml #\space ) 2 )) #( define commllen ( - (string-length comml ) 2 )) #( define filen( substring comml loc commllen )) %%{ #(define (footnote-filename) (define (periodize i l) (if (null? l) i (periodize (string-append i "." (car l)) (cdr l (let* ((comml (object->string (command-line))) (loc (+ (string-rindex comml #\space) 2)) (commllen (- (string-length comml) 2)) (filen (substring comml loc commllen)) (filesplit (string-split filen #\.)) (filehead (if (eq? 1 (length filesplit)) (car filesplit) (periodize (car filesplit) (cdr (reverse (cdr (reverse filesplit (string-append filehead ".ly"))) #(define filN (footnote-filename)) % samplePath = #'((moveto 0 0) (lineto -1 3) (lineto -1 3) (
Re: Invalid UTF-8 string passed to pango_layout_set_text()
On Thu 12 Nov 2015 at 14:53:31 (+), MING TSANG wrote: > I ran the attach file and got the following. > Question: can this be solved? How? Appreciate help given. > > Starting lilypond.exe 2.19.31 [test_ymt-曾煒明.ly]... > Processing `K:/LILY_POND/test_ymt-��.ly' > Parsing... > Interpreting music... > Preprocessing graphical objects... > Finding the ideal number of pages... > (lilypond.exe:1892): Pango-WARNING **: Invalid UTF-8 string passed to > pango_layout_set_text() > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' > warning: no glyph for character U+FFFD in font `C:/Windows/fonts/times.ttf' > Fitting music on 1 page... You could try typesetting your filename into an .eps file outside LP and passing it in as a graphic with \markup { ... \epsfile ... See page 232 Notation Manual (2.18.2). It's ironic that it can't set U+FFFD because that is the Replacement Character, as seen here: Processing `K:/LILY_POND/test_ymt-��.ly' Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Invalid UTF-8 string passed to pango_layout_set_text()
Hi Ming, On 12.11.2015 15:53, MING TSANG wrote: Hi, lilyponders: I ran the attach file and got the following. Question: can this be solved? How? It works fine if you don’t use any non-ASCII characters in the file name. I hope this is no problem for you. Else, there won’t be much we can do, since the problem is not with LilyPond, but with GhostScript. Immanuel, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: + utf-8 characters on file name
Excuse me for top-quoing, my phone forces me. LilyPond intentionally changes non-alphanumeric characters to the underscore for the output-suffix. It doesn't do that for \bookOutputName, however. I recently got bitten by this too and changed Frescobaldi so that it recognizes the changed characters when looking for LilyPond-generated output files. -- Wilbert Berendsen (www.wilbertberendsen.nl) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: + utf-8 characters on file name
On Wednesday, March 19, 2014 3:36:42 AM, Wilbert Berendsen wbs...@xs4all.nl wrote: Excuse me for top-quoing, my phone forces me. LilyPond intentionally changes non-alphanumeric characters to the underscore for the output-suffix. It doesn't do that for \bookOutputName, however. I recently got bitten by this too and changed Frescobaldi so that it recognizes the changed characters when looking for LilyPond-generated output files. -- Wilbert Berendsen (www.wilbertberendsen.nl) Wilbert: Thank you for the info. Is this problem solvable? \version 2.19.3 \book { \markup {This does generates a pdf file with +} \bookOutputName test_utf-8_filename(3)+男中+ {d' d' } } After running the avoe .ly file the log below shows the correct .pdf file name created, but when browse by a file manager the .pdf display garbage. Please refer to screen print - the red text. Some log file entry display the right file name and some does not. Where is log file produced? Starting lilypond-windows.exe 2.19.3 [test_utf-8_filename(男中).ly]... Processing `C:/Users/Tsang/Dropbox/sample_lily-code/test_utf-8_filename().ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `test_utf-8_filename(3)+男中+.ps'... Converting to `./test_utf-8_filename(3)+男中+.pdf'... Success: compilation successfully completed Completed successfully in 1.2.attachment: 2014-03-19_141355.png___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
+ utf-8 characters on file name
The attached .ly file generate two pdf files. 1. test_utf-8_filename.pdf 2. test_uft-8_filename-SA_TB.pdf I was anticipating that the 2nd pdf file name to be test_utf-8_filename-SA+TB.pdf Instead it generates test_utf-8_filename-SA_TB.pdf. Is it that lilypond cannot generate utf-8 character in the file name? Any work around? Emmanuel, Ming \version 2.19.3 \language english \header { title = test % Remove default LilyPond tagline tagline = ##f } \paper { #(set-paper-size letter) } global = { \key c \major \time 4/4 \tempo 4=100 } soprano = { \global c''2 b'2 } alto = { \global a'2. b'4 } tenor = { \global c4 d4 e4 f4 } bass = { \global a,4 c4 a,4 c4 } \score { \new ChoirStaff \new Staff \with {} \new Voice = soprano \soprano \new Staff \with {} \new Voice = alto \alto \new Staff \with {} { \clef bass \new Voice = tenor \tenor } \new Staff \with { } { \clef bass \new Voice = bass \bass } \layout { } \midi { } } \book { \bookOutputSuffix SA+TB \score { \new ChoirStaff \new Staff \with { } \new Voice = soprano{ \voiceOne \soprano } \new Voice = alto { \voiceTwo \alto } \new Staff \with { } \clef bass \new Voice = tenor { \voiceOne\tenor } \new Voice = bass { \voiceTwo \bass } \layout { } } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: + utf-8 characters on file name
On Tuesday, March 18, 2014 12:58:13 PM, MING TSANG tsan...@rogers.com wrote: The attached .ly file generate two pdf files. 1. test_utf-8_filename.pdf 2. test_uft-8_filename-SA_TB.pdf I was anticipating that the 2nd pdf file name to be test_utf-8_filename-SA+TB.pdf Instead it generates test_utf-8_filename-SA_TB.pdf. Is it that lilypond cannot generate utf-8 character in the file name? Any work around? Emmanuel, Ming Additional info: I change the bookOutSuffix to utf-8 character 男女 and I got the following error: Starting lilypond-windows.exe 2.19.3 [test_utf-8_filename.ly]... Processing `C:/Users/Tsang/Dropbox/sample_lily-code/test_utf-8_filename.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems...C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/framework-ps.scm:450:22: In procedure open-file in expression (open-file filename wb): C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/framework-ps.scm:450:22: Invalid argument: test_utf-8_filename-�__�_�.ps Exited with return code 1.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: + utf-8 characters on file name
Hi Ming, someone with more knowledge about Unicode (and Windows) could perhaps explain why that happens, but since you also asked for a workaround: Instead of using \bookOutSuffix, you could try with \bookOutputName, like this: \book { \bookOutputName +中国曲子+ Which works fine over here (version 2.18, Mac OSX 10.8.4). / Fredrik On 18 March 2014 18:16, MING TSANG tsan...@rogers.com wrote: On Tuesday, March 18, 2014 12:58:13 PM, MING TSANG tsan...@rogers.com wrote: The attached .ly file generate two pdf files. 1. test_utf-8_filename.pdf 2. test_uft-8_filename-SA_TB.pdf I was anticipating that the 2nd pdf file name to be test_utf-8_filename-SA+TB.pdf Instead it generates test_utf-8_filename-SA_TB.pdf. Is it that lilypond cannot generate utf-8 character in the file name? Any work around? Emmanuel, Ming Additional info: I change the bookOutSuffix to utf-8 character 男女 and I got the following error: Starting lilypond-windows.exe 2.19.3 [test_utf-8_filename.ly]... Processing `C:/Users/Tsang/Dropbox/sample_lily-code/test_utf-8_filename.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems...C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/framework-ps.scm:450:22: In procedure open-file in expression (open-file filename wb): C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/framework-ps.scm:450:22: Invalid argument: test_utf-8_filename-�__�_�.ps Exited with return code 1. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: + utf-8 characters on file name
Am 18.03.2014 21:05, schrieb Fredrik Wallberg: Hi Ming, someone with more knowledge about Unicode (and Windows) could perhaps explain why that happens, but since you also asked for a workaround: Instead of using \bookOutSuffix, you could try with \bookOutputName, like this: \book { \bookOutputName +中国曲子+ Which works fine over here (version 2.18, Mac OSX 10.8.4). However, especially encoding issues are likely to depend on the operating system. / Fredrik And Ming, please note that it is compulsory on bug-lilypond and strongly advised also on lilypond-user that you use Minimal examples http://lilypond.org/website/tiny-examples.html. It often makes understanding the problem and testing solutions much easier. So in the current case, the file could have been as short as \version 2.19.3 \bookOutputSuffix SA+TB { c' } , which by the way shows the same behavior on linux. Best regards, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: + utf-8 characters on file name
On Tuesday, March 18, 2014 5:58:51 PM, Simon Albrecht simon.albre...@mail.de wrote: Am 18.03.2014 21:05, schrieb Fredrik Wallberg: Hi Ming, someone with more knowledge about Unicode (and Windows) could perhaps explain why that happens, but since you also asked for a workaround: Instead of using \bookOutSuffix, you could try with \bookOutputName, like this: \book { \bookOutputName +中国曲子+ Which works fine over here (version 2.18, Mac OSX 10.8.4). However, especially encoding issues are likely to depend on the operating system. / Fredrik And Ming, please note that it is compulsory on bug-lilypond and strongly advised also on lilypond-user that you use Minimal examples. It often makes understanding the problem and testing solutions much easier. So in the current case, the file could have been as short as \version 2.19.3 \bookOutputSuffix SA+TB { c' } , which by the way shows the same behavior on linux. Best regards, Simon Simon: Thank you for your simple code to demonstrate my problem. Is this a bug in lily? If it is how to submit to bug report? Fredrik: Thank you suggesting using \bookOutputName, I see on the log file indicating .ps file is converted to pdf, but I cannot find it Here is the revise lily code: \version 2.19.3 %(1 ...) \markup { This generate default pdf file with file name} { c' d ' e' f' } \book { \markup { This generate pdf file with SA_TB instead of SA+TB } \bookOutputSuffix SA+TB { c' } } %(2 ...) \book { \markup {This does not generates a pdf file} \bookOutputName ab+中国曲子+ {d' d' } } %(3 .) \book { \markup {this generate error} \bookOutputSuffix 男+女 { e' e' e' e' } } And the log file: ' e' e' e' } } And here is the log file: Starting lilypond-windows.exe 2.19.3 [test_utf-8_filename.ly]... Processing `C:/Users/Tsang/Dropbox/sample_lily-code/test_utf-8_filename.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `test_utf-8_filename-SA_TB.ps'... Converting to `./test_utf-8_filename-SA_TB.pdf'... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `ab+中国曲子+.ps'... Converting to `./ab+中国曲子+.pdf'... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems...C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/framework-ps.scm:450:22: In procedure open-file in expression (open-file filename wb): C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/framework-ps.scm:450:22: Invalid argument: test_utf-8_filename-�___�_�.ps Exited with return code 1.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
utf-8 characters in file name.
%%lily code file name Test_中文.ly \version 2.19.2 #(define (footnote-filename) (define (periodize i l) (if (null? l) i (periodize (string-append i . (car l)) (cdr l (let* ((comml (object-string (command-line))) (loc (+ (string-rindex comml #\space) 2)) (commllen (- (string-length comml) 2)) (filen (substring comml loc commllen)) (filesplit (string-split filen #\.)) (filehead (if (eq? 1 (length filesplit)) (car filesplit) (periodize (car filesplit) (cdr (reverse (cdr (reverse filesplit (string-append filehead .ly))) #(define filN (footnote-filename)) music = { f'8 c'8 f'8 g'8 b'8 a'8 g'8 f'8 } \book { \bookOutputSuffix tenor_男 \score { \new Staff \with { } \music \layout {} \midi {\tempo 4=64} } \markup \line { \tiny \filN } } %%end lily code After I ran the above lily code I got the following warning error. I don't under what is the conflict copy. How can I find it in window 7? The file name printed on the .pdf does not contain utf-8 character. On window 7 explorer (file manager) can show utf-8 character on directory name and file name, but lilypond cannot generate it even lilypond can display utf-8 character in lyrics. This is what lilypond generated .pdf shows: C:/Users/Tsang/Dropbox/Lyndon/choir/find-us-faithful_ \ x82/test_.ly the directory name is find-us-faithful_薪火永傳 and the file name is test_中文.ly attached is the generated pdf - trying to generate test_中文-tenor_男.pdf but the file name shown as - please refer to the file name of the attachment. Also lilypond log does not show utf-8 character Any help is appreciated! Starting lilypond-windows.exe 2.19.2 [test_中文.ly]... Processing `C:/Users/Tsang/Dropbox/Lyndon/choir/find-us-faithful_н��/test_.ly' Parsing... Interpreting music... Preprocessing graphical objects... Interpreting music... MIDI output to `test_-tenor_�__.mid'... (lilypond-windows.exe:6920): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text() warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' warning: no glyph for character U+EFFF in font `C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/fonts/otf/CenturySchL-Roma (tsang's conflicted copy 2012-05-21).otf' Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `test_-tenor_�__.ps'... Converting to `./test_-tenor_�__.pdf'... Success: compilation successfully completed Completed successfully in 1.1. test_中文-tenor_鏮_.pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
UTF-8 error
This is supposed to be a reply to the posting about UTF-8 encoding and/or lilypond problems. Unfortunately I deleted the original thread. I want to reply to the message that had a test.zip attached including a problematic(?) test.ly tiny example and a bad(?) test.pdf file. I am running Fedora 18 and use lilypond 2.16.2 I can confirm: 1. The test.pdf in the zip is bad, and cannot be loaded in (for example) evince 2. If I check in my terminal: file test.ly This is returned: test.ly: UTF-8 Unicode text look fine to me. But: if I do: lilypond test.ly I am getting a test.pdf that is loaded and displayed just fine in Evince. Starting from the terminal I do see some strange messages: Entity: line 10: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xE0 0x20 0xC9 0x6C format='application/pdf'dc:titlerdf:Altrdf:li xml:lang='x-default'Lettre ^ I decided to try something else (maybe this works on your system too?) lilypond --ps test.ly ps2pdf test.ps test.pdf ps2pdf12 test.ps test12.pdf ps2pdf13 test.ps test13.pdf ps2pdf14 test.ps test14.pdf The files test.pdf and test14.pdf are displayed correctly, but produce the error messages in my terminal The files test12.pdf and test13.pdf are displayed WITHOUT these error messages. This looks like a ghostscript problem. Is this the issue that is fixed in the new upstream versions? Maybe this adds some info to the discussion. Sorry for leaving the original thread. Please edit the Subject: field when replying, to get this back in the original thread. -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
UTF-8 character - inverted quotation marks
Greetings - I'm transcribing some Bartok for my personal use. Apparently, Hungarian uses inverted opening quotation marks, like ,,Title. I cannot find inverted double quotation marks in the UTF-8 character sets online. Can anyone tell me the code for inverted quotation marks? Thanks in advance, Ralph -- Ralph Palmer Montague City, MA USA palmer.r.vio...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
RE: UTF-8 character - inverted quotation marks
Ralph, From: lilypond-user-bounces+james.lowe=datacore@gnu.org [mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On Behalf Of Ralph Palmer Sent: 10 February 2011 12:02 To: lilypond-user Mailinglist Subject: UTF-8 character - inverted quotation marks Greetings - I'm transcribing some Bartok for my personal use. Apparently, Hungarian uses inverted opening quotation marks, like ,,Title. I cannot find inverted double quotation marks in the UTF-8 character sets online. Can anyone tell me the code for inverted quotation marks? http://en.wikipedia.org/wiki/Quotation_mark_glyphs This says: Low double curved quote, left DOUBLE LOW-9 QUOTATION MARK 201E (8222) But I looked this number up and either this Wikipedia article is wrong or I am not looking in the right list ☺ My reference was http://www.utf8-chartable.de/ I hope this helps in some way. James ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 character - inverted quotation marks
Ralph Palmer palmer.r.vio...@gmail.com writes: I'm transcribing some Bartok for my personal use. Apparently, Hungarian uses inverted opening quotation marks, like ,,Title. I cannot find inverted double quotation marks in the UTF-8 character sets online. For these purposes I use the GNOME Character Set application. A search for “quot” let me cycle through until I found the one you're asking for. Can anyone tell me the code for inverted quotation marks? „ U+201E DOUBLE LOW-9 QUOTATION MARK -- \ “Dare to be naïve.” —Richard Buckminster Fuller, personal motto | `\ | _o__) | Ben Finney ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 character - inverted quotation marks
DOUBLE LOW-9 QUOTATION MARK 201E (8222) This number is correct. The two quotation characters as used in Germany are „ (U+201E) and “ (U+201C). In X, on my GNU/Linux box, I get those characters by pressing Multi_Key quotedbl comma and Multi_key quotedbl less respectively. However, I don't know where Multi_key, the compose key, is mapped to by default. Werner ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 character - inverted quotation marks
Quoting Ralph Palmer (palmer.r.vio...@gmail.com): I'm transcribing some Bartok for my personal use. Apparently, Hungarian uses inverted opening quotation marks, like ,,Title. I cannot find inverted double quotation marks in the UTF-8 character sets online. Can anyone tell me the code for inverted quotation marks? I do not know Hungarian, but maybe you are looking for U+201E (DOUBLE LOW-9 QUOTATION MARK)? If not, I can recommend \url{http://www.unicode.org/ucd/} for a search. If I remember correctly, it's in German, but the important information should be usable nonetheless, especially as the naming for the glyphs stays in english. Hope tht helps, Susan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: UTF-8 character - inverted quotation marks
The two quotation marks used in Hungarian are „ and ” U+201E and U+201D, to begin and end. Bert On Thu, Feb 10, 2011 at 1:40 PM, Werner LEMBERG w...@gnu.org wrote: DOUBLE LOW-9 QUOTATION MARK 201E (8222) This number is correct. The two quotation characters as used in Germany are „ (U+201E) and “ (U+201C). In X, on my GNU/Linux box, I get those characters by pressing Multi_Key quotedbl comma and Multi_key quotedbl less respectively. However, I don't know where Multi_key, the compose key, is mapped to by default. Werner ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
how to add a utf-8 character to the title
hello, this seems like a simple thing, but i've been unable to find anything in the archives and the documentation. basically, i'd like to add a title that contains an accented character (unicode = 00e9). outside of lilypond the title would be: Sinte' Intro i can create the variable accentE = #(ly:export (ly:wide-char-utf-8 #x00e9)) and then i've tried i've tried: \header{ title = Sint \accentE Intro } however, this doesn't work. how can i concatenate these strings and utf-8 character to have the correct title? thanks, -brian ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
If you're using a UTF-8 aware editor it should be a simple matter to simply enter your accented 'e' in your input file and have it appear in the output. Is your editor UTF-8 aware/capable and are you saving the file as UTF-8? -David Brian Kidd wrote: hello, this seems like a simple thing, but i've been unable to find anything in the archives and the documentation. basically, i'd like to add a title that contains an accented character (unicode = 00e9). outside of lilypond the title would be: Sinte' Intro i can create the variable accentE = #(ly:export (ly:wide-char-utf-8 #x00e9)) and then i've tried i've tried: \header{ title = Sint \accentE Intro } however, this doesn't work. how can i concatenate these strings and utf-8 character to have the correct title? thanks, -brian ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
the long way worked. thanks! On Jul 19, 2009, at 12:33 AM, Mark Polesky wrote: Brian Kidd wrote: i can create the variable accentE = #(ly:export (ly:wide-char-utf-8 #x00e9)) and then i've tried i've tried: \header{ title = Sint \accentE Intro } however, this doesn't work. how can i concatenate these strings and utf-8 character to have the correct title? The long way: \header { title = \markup \concat {Sint \accentE Intro} } The short way (make sure your file is saved with UTF-8 encoding): \header { title = Sinté Intro } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
On 19.07.2009, at 09:23, Brian Kidd wrote: hello, this seems like a simple thing, but i've been unable to find anything in the archives and the documentation. basically, i'd like to add a title that contains an accented character (unicode = 00e9). outside of lilypond the title would be: Sinte' Intro All you need to do is type it in, Sinté( or Sintè) Intro. See section 3.3.3 of the Learning manual for more info. James E. Bailey ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
Brian Kidd wrote: i can create the variable accentE = #(ly:export (ly:wide-char-utf-8 #x00e9)) and then i've tried i've tried: \header{ title = Sint \accentE Intro } however, this doesn't work. how can i concatenate these strings and utf-8 character to have the correct title? The long way: \header { title = \markup \concat {Sint \accentE Intro} } The short way (make sure your file is saved with UTF-8 encoding): \header { title = Sinté Intro } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
2009/7/19 Brian Kidd brianki...@gmail.com: the long way worked. thanks! Use the short way, it's much shorter and comfortable e.g. for lyrics -- Francisco Vila. Badajoz (Spain) www.paconet.org ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
thanks to all who suggested using the short way. unfortunately, my system does not seem to be configured for this easy solution. when i run lilypond on the simple file below, i get the following error and the title is SintIntro instead of Sinté Intro. i'm happy using the long way, but would be interested in knowing how to fix the problem with the short way. thanks, -brian example_title.ly %% simple lilypond example file \version 2.12.2 \header{ title = Sinté Intro tagline = ##f } \paper{ #(set-paper-size letter) line-width = 7.0\in } \markup{ \null } %% EOF lilypond example_title.ly GNU LilyPond 2.12.2 Processing `example_title.ly' Parsing... (process:14331): Pango-WARNING **: Error loading GDEF table 28333 (process:14331): Pango-WARNING **: Error loading GSUB table 28333 (process:14331): Pango-WARNING **: Error loading GPOS table 28333 (process:14331): Pango-WARNING **: Error loading GDEF table 28333 (process:14331): Pango-WARNING **: Error loading GSUB table 28333 (process:14331): Pango-WARNING **: Error loading GPOS table 28333 programming error: FT_Get_Glyph_Name () error: invalid argument continuing, cross fingers programming error: Glyph has no name, but font supports glyph naming. Skipping glyph U+, file /Applications/LilyPond.app/Contents/ Resources/share/lilypond/current/fonts/otf/CenturySchL-Bold.otf continuing, cross fingers Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `example_title.ps'... Converting to `./example_title.pdf'... On Jul 19, 2009, at 2:29 AM, Francisco Vila wrote: 2009/7/19 Brian Kidd brianki...@gmail.com: the long way worked. thanks! Use the short way, it's much shorter and comfortable e.g. for lyrics -- Francisco Vila. Badajoz (Spain) www.paconet.org ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
Brian Kidd wrote: thanks to all who suggested using the short way. unfortunately, my system does not seem to be configured for this easy solution. when i run lilypond on the simple file below, i get the following error and the title is SintIntro instead of Sint� Intro. i'm happy using the long way, but would be interested in knowing how to fix the problem with the short way. thanks, -brian Hi Brian, I can't help you with the error message.. Anyway, your snippet works fine in my PC (I use lilypond 2.12.1). Are you sure you are saving your file in UTF-8? Which editor are you using? Federico ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
On Jul 19, 2009, at 9:40 AM, Federico Bruni wrote: Brian Kidd wrote: thanks to all who suggested using the short way. unfortunately, my system does not seem to be configured for this easy solution. when i run lilypond on the simple file below, i get the following error and the title is SintIntro instead of Sint� Intro. i'm happy using the long way, but would be interested in knowing how to fix the problem with the short way. thanks, -brian Hi Brian, Hi Federico, I can't help you with the error message.. Anyway, your snippet works fine in my PC (I use lilypond 2.12.1). Are you sure you are saving your file in UTF-8? Not entirely. Which editor are you using? Vim. Federico Thanks for the response. -brian ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
Brian Kidd wrote: On Jul 19, 2009, at 9:40 AM, Federico Bruni wrote: Are you sure you are saving your file in UTF-8? Not entirely. Which editor are you using? Vim. I guess you are a coder ;-) You may try other editors that have better support for Lilypond. jEdit with the Lilytool plugin: http://lilypondtool.organum.hu/ Frescobaldi: http://www.frescobaldi.org/ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: how to add a utf-8 character to the title
At 09:47 on 19 Jul 2009, Brian Kidd wrote: Are you sure you are saving your file in UTF-8? Not entirely. Which editor are you using? Vim. :set encoding=utf-8 fileencodings= -- Mark Knoop ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Lilypondtool 2.12-r2 and UTF-8
Strange, it shouldn't happen, I thought I had removed that code. nick.pa...@internode.on.net wrote: I updated to this version of LPT a few days ago. It fixes the problem with jPedal and jEdit locking up if jPedal is not showing the first page of the PDF when rebuilding the ly file, but although I have the default file encoding in jEdit set to UTF-8, it still insists on saving ly files as UTF-8Y. This only happens with ly files: I can open or create other types of file using UTF-8 encoding and they remain UTF-8 on saving. Nick ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Lilypondtool 2.12-r2 and UTF-8
I updated to this version of LPT a few days ago. It fixes the problem with jPedal and jEdit locking up if jPedal is not showing the first page of the PDF when rebuilding the ly file, but although I have the default file encoding in jEdit set to UTF-8, it still insists on saving ly files as UTF-8Y. This only happens with ly files: I can open or create other types of file using UTF-8 encoding and they remain UTF-8 on saving. Nick ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
On 24 Jan 2009, at 12:35, Ole Schmidt wrote: when I choose in the preferences show invisible characters, my file look like this: Bild 1.jpg it seems like a copy paste promblem from my mail-client (Apple Mail). Does anyone know how to fix this? What editor did you use - it is showing probably newlines, tabs and spaces. So what is the problem? One way to make a LilyPond file is to copy the text in Mail, then go to Terminal and type cat file.ly Then paste and end with ^D (control-D). This creates a file file.ly. It works fine with the Xcode editor, too. In it, the menu View - Text can be used to change line endings and character encodings. Hans ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
On 25 Jan 2009, at 11:58, Ole Schmidt wrote: the screenshot was from Smultron. The problem is attached, when I copy paste from Mail to Smultron/jedit/Terminal and try to compile, I get the following error warnings (see Pict.2), when I changed the tabs/spaces like in the third picture it works. It is annoying to change every line manually... I think I found the example you gave: it seems to be from a ppost by James Bailey, Aug. 30 2008. I did not have any problems when selecting the code in Mail 3.5, copying, and making a file of it in Terminal using 'cat file.y' return paste ctrl-D, and the compiling using lilypond 2.12.1. So it may have to do with the editor you are using. Have you tried using the 'cat' method? Hans ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
Am 25.01.2009 um 10:38 schrieb Hans Aberg: On 24 Jan 2009, at 12:35, Ole Schmidt wrote: when I choose in the preferences show invisible characters, my file look like this: Bild 1.jpg it seems like a copy paste promblem from my mail-client (Apple Mail). Does anyone know how to fix this? What editor did you use - it is showing probably newlines, tabs and spaces. So what is the problem? One way to make a LilyPond file is to copy the text in Mail, then go to Terminal and type cat file.ly Then paste and end with ^D (control-D). This creates a file file.ly. It works fine with the Xcode editor, too. In it, the menu View - Text can be used to change line endings and character encodings. Out of curiosity, do you know a way to stop apple mail from converting at the beginning of a line to two levels of quoted text? So, {c'1} {a1} can be copied properly ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
when I try the cat method and then compile directly from the terminal I get the same error warning as before. I'am on Mac OS 10.5.6. using the latest Lilypond... Am 25.01.2009 um 13:00 schrieb Hans Aberg: On 25 Jan 2009, at 11:58, Ole Schmidt wrote: the screenshot was from Smultron. The problem is attached, when I copy paste from Mail to Smultron/jedit/Terminal and try to compile, I get the following error warnings (see Pict.2), when I changed the tabs/spaces like in the third picture it works. It is annoying to change every line manually... I think I found the example you gave: it seems to be from a ppost by James Bailey, Aug. 30 2008. I did not have any problems when selecting the code in Mail 3.5, copying, and making a file of it in Terminal using 'cat file.y' return paste ctrl-D, and the compiling using lilypond 2.12.1. So it may have to do with the editor you are using. Have you tried using the 'cat' method? Hans ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
On 25 Jan 2009, at 13:19, James E. Bailey wrote: Out of curiosity, do you know a way to stop apple mail from converting at the beginning of a line to two levels of quoted text? So, {c'1} {a1} can be copied properly I don't have any problems with that; I tried 'cat', Xcode and TextEdit. When exactly does this occur? (I have set Preferences - Fonts Colors - Color quoted text.) Hans ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
On 25 Jan 2009, at 13:35, Ole Schmidt wrote: when I try the cat method and then compile directly from the terminal I get the same error warning as before. I'am on Mac OS 10.5.6. using the latest Lilypond... What LilyPond are you using? - I'm using the one put into / Applications/. And when you do 'less' in Terminal on the file you created 'cat', what do you see? - If you use UNIX ones, it will look OK, but scrambled if they are Mac OS 9. Hans ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
I'am using Lilypond 2.12.1-1 which lives in the application folder. When I copy the same example as before and paste it into the terminal via cat method, it looks normal when use the less command. When I try to compile it with lilypond, I get the errorwarning below...(as before)... when I compile the same file, move all the lines at the beginning, it compiles fine. errorwarning: %%% piano.ly:3:2: Fehler: syntax error, unexpected \context, expecting '=' \context { piano.ly:4:5: Fehler: syntax error, unexpected \type, expecting '=' ? ? \type Engraver_group piano.ly:20:13: Fehler: Ungültige Fluchtsequenz: »\GrandStaff« \context { \GrandStaff \accepts Dynamics } piano.ly:20:11: Fehler: Fehler gefunden, musikalischer Ausdruck wird ignoriert \contex t { \GrandStaff \accepts Dynamics } piano.ly:29:0: Fehler: syntax error, unexpected STRING piano.ly:31:0: Fehler: syntax error, unexpected STRING \new Staff = musici \global \musici \new Dynamics \dynamics \new Staff = musicii \global \musicii piano.ly:32:0: Fehler: syntax error, unexpected STRING piano.ly:29:2: Fehler: Fehler gefunden, musikalischer Ausdruck wird ignoriert piano.ly:38:0: Fehler: syntax error, unexpected STRING \new Staff = musici \context Voice = musici \global \musici \new Dynamics \context Voice = musici \dynamics \new Staff = musicii \global \musicii piano.ly:39:0: Fehler: syntax error, unexpected STRING piano.ly:36:2: Fehler: Fehler gefunden, musikalischer Ausdruck wird ignoriert Fehler: gescheiterte Dateien: piano.ly Am 25.01.2009 um 14:56 schrieb Hans Aberg: On 25 Jan 2009, at 13:35, Ole Schmidt wrote: when I try the cat method and then compile directly from the terminal I get the same error warning as before. I'am on Mac OS 10.5.6. using the latest Lilypond... What LilyPond are you using? - I'm using the one put into / Applications/. And when you do 'less' in Terminal on the file you created 'cat', what do you see? - If you use UNIX ones, it will look OK, but scrambled if they are Mac OS 9. Hans ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
On 25 Jan 2009, at 18:03, Ole Schmidt wrote: I'am using Lilypond 2.12.1-1 which lives in the application folder. When I copy the same example as before and paste it into the terminal via cat method, it looks normal when use the less command. This is good - it means that you got UNIX line endings. When I try to compile it with lilypond, I get the errorwarning below...(as before)... when I compile the same file, move all the lines at the beginning, it compiles fine. Typo, isn't it: you removed some lines in the beginning. I compiled the snippet below, between the . So if that is what worked for you, too, you might have gotten some stuff in that. Hans \version 2.11.57 \layout { \context { \type Engraver_group \name Dynamics \alias Voice \consists Output_property_engraver \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1) \override DynamicLineSpanner #'Y-offset = #0 \consists Script_engraver \consists Dynamic_engraver \consists Text_engraver \consists Skip_event_swallow_translator \consists Axis_group_engraver } \context { \GrandStaff \accepts Dynamics } } global = { \key a \major } musici = \relative c' { R1 \change Staff = musicii \voiceOne cis8 b a gis fis gis a b cis dis e fis gis4 e } musicii = \relative a,{ \clef bass R1 \voiceTwo a8 b cis d e4 d e fis e8 d cis b } dynamics = { \override DynamicTextSpanner #'dash-period = #-1.0 \crescTextCresc s1 s1\ s2\!\ s2\! } \score { \new GrandStaff \new Staff = musici \global \musici \new Dynamics \dynamics \new Staff = musicii \global \musicii } \score { \new GrandStaff \new Staff = musici \context Voice = musici \global \musici \new Dynamics \context Voice = musici \dynamics \new Staff = musicii \global \musicii } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
the mails look like this when they are seen in the mail previev (colored double lines instead of ) ole inline: Bild 1.jpg Am 25.01.2009 um 14:45 schrieb Hans Aberg: On 25 Jan 2009, at 13:19, James E. Bailey wrote: Out of curiosity, do you know a way to stop apple mail from converting at the beginning of a line to two levels of quoted text? So, {c'1} {a1} can be copied properly I don't have any problems with that; I tried 'cat', Xcode and TextEdit. When exactly does this occur? (I have set Preferences - Fonts Colors - Color quoted text.) Hans ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
I have seen it - it seems to be a bug in Mail. Report it on apple.com/ feedback/ (with example) if you so want. One way around it is to select View - Message - Original Content (opt-cmd-U), and then copy. This might be a way around the other problem. Otherwise, Mail has Format - Indentation, and so does Xcode, and some other text editors. Hans On 25 Jan 2009, at 18:15, Ole Schmidt wrote: the mails look like this when they are seen in the mail previev (colored double lines instead of ) ole Bild 1.jpg ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
thanks, this also solves the problem which was mentioned by James that Apple mail converts at the beginning of a line to two levels of quoted text... ole Am 25.01.2009 um 20:50 schrieb Hans Aberg: One way around it is to select View - Message - Original Content (opt-cmd-U), and then copy. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
utf-8 characters
Hello List I understand the way to put special characters into markup is as below (from Mark's reply to the stopwach question below - although missing the struck out letters - read on). But how do I strike out the char part in LilyPond (Mac X.4.11)? Unlike, other charcters, like 中, for example, it doesn't seem possible to cut and paste these struck out letters into the lily editor. Excuse this basic question, but I can't spot references to this issue in the lily docs. Regards Tom min = \markup { %% 2032 = PRIME #(ly:export (format ~a (ly:wide-char-≥utf-8 #x2032))) } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
There may be an easier way. In osx, you have utf-8 on by default. So you don't need to use the lilypond special of inserting utf-8 characters. Which, by the way, mark's way I don't understand, it uses scheme. The easier way is to just use \markup \concat { 4/char ##x2032 } But, since on osx, you have utf8 on by default, you should just be able to copy and paste something from the character palette directly into the editor. { \mark \markup \rounded-box { \small { 4′33″ } } c'2 } Am 24.01.2009 um 10:57 schrieb Tom Hall: Hello List I understand the way to put special characters into markup is as below (from Mark's reply to the stopwach question below - although missing the struck out letters - read on). But how do I strike out the char part in LilyPond (Mac X.4.11)? Unlike, other charcters, like 中, for example, it doesn't seem possible to cut and paste these struck out letters into the lily editor. Excuse this basic question, but I can't spot references to this issue in the lily docs. Regards Tom min = \markup { %% 2032 = PRIME #(ly:export (format ~a (ly:wide-char-≥utf-8 #x2032))) } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
James E. Bailey derhindemith at googlemail.com writes: There may be an easier way. In osx, you have utf-8 on by default. So you don't need to use the lilypond special of inserting utf-8 characters. Which, by the way, mark's way I don't understand, it uses scheme. The easier way is to just use \markup \concat { 4/char ##x2032 } But, since on osx, you have utf8 on by default, you should just be able to copy and paste something from the character palette directly into the editor. { \mark \markup \rounded-box { \small { 4′33″ } } c'2 } Hmm, trying the code directly above, gives me the following error (3 times) (process:398): Pango-WARNING **: Error loading GDEF table 28333 I also get an error as follows when trying the code below: Regards Tom error: syntax error, unexpected SCM_TOKEN \concat { 4/char ##x2032 } %% { \mark \markup \rounded-box { \small { \concat { 4/char ##x2032 } } } c'2 } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
Am 24.01.2009 um 11:44 schrieb Tom Hall: James E. Bailey derhindemith at googlemail.com writes: { \mark \markup \rounded-box { \small { 4′33″ } } c'2 } Hmm, trying the code directly above, gives me the following error (3 times) (process:398): Pango-WARNING **: Error loading GDEF table 28333 I get the same errors, but the output pdf looks exactly as expected I also get an error as follows when trying the code below: Regards Tom error: syntax error, unexpected SCM_TOKEN \concat { 4/char ##x2032 } %% { \mark \markup \rounded-box { \small { \concat { 4/char ##x2032 } } } c'2 } this would probaly be due to using a forward slash instead of a backwards slash in front of char ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
James E. Bailey derhindemith at googlemail.com writes: Hello James I also get an error as follows when trying the code below: Regards Tom error: syntax error, unexpected SCM_TOKEN \concat { 4/char ##x2032 } %% { \mark \markup \rounded-box { \small { \concat { 4/char ##x2032 } } } c'2 } this would probaly be due to using a forward slash instead of a backwards slash in front of char yes, careless typo, however the below also gives an error Regards Tom { \mark \markup \rounded-box { \small { \concat { 4\char ##x2032 } } } c'2 } error: (process:440): Pango-WARNING **: Error loading GDEF table 28333 ... Wrong number of arguments to #procedure font-file-as-ps-string (name file-name font-index) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
when I choose in the preferences show invisible characters, my file look like this: inline: Bild 1.jpg it seems like a copy paste promblem from my mail-client (Apple Mail). Does anyone know how to fix this? ole Am 24.01.2009 um 12:23 schrieb James E. Bailey: { \mark \markup \rounded-box { \small { 4′33″ } } c'2 } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
Oh yeah, that's a problem. Apparently it's been fixed, it's just not in the distributed binary. There's a thread on the list that shows how to fix it. Am 24.01.2009 um 12:26 schrieb Tom Hall: James E. Bailey derhindemith at googlemail.com writes: Hello James I also get an error as follows when trying the code below: Regards Tom error: syntax error, unexpected SCM_TOKEN \concat { 4/char ##x2032 } %% { \mark \markup \rounded-box { \small { \concat { 4/char ##x2032 } } } c'2 } this would probaly be due to using a forward slash instead of a backwards slash in front of char yes, careless typo, however the below also gives an error Regards Tom { \mark \markup \rounded-box { \small { \concat { 4\char ##x2032 } } } c'2 } error: (process:440): Pango-WARNING **: Error loading GDEF table 28333 ... Wrong number of arguments to #procedure font-file-as-ps-string (name file-name font-index) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
James E. Bailey derhindemith at googlemail.com writes: { \mark \markup \rounded-box { \small { \concat { 4\char ##x2032 } } } c'2 } error: (process:440): Pango-WARNING **: Error loading GDEF table 28333 ... Wrong number of arguments to #procedure font-file-as-ps-string (name file-name font-index) Oh yeah, that's a problem. Apparently it's been fixed, it's just not in the distributed binary. There's a thread on the list that shows how to fix it. Thanks James, fixing the .scm file as indicated in your Stopwatch time in markup post did the trick, so that the below now works fine. Regards Tom \version 2.12.1 { \mark \markup { \rounded-box \small \concat { 4\char ##x2032 33 \char ##x2033 } } c'1 | \mark \markup { \rounded-box \small \concat { 4′33″ } } d'1 } % ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: utf-8 characters
On 1/24/09 4:36 AM, James E. Bailey derhindem...@googlemail.com wrote: Oh yeah, that's a problem. Apparently it's been fixed, it's just not in the distributed binary. There's a thread on the list that shows how to fix it. You can also find the fix on issue 735 at the bug tracker, thanks to James: http://code.google.com/p/lilypond/issues/detail?id=735 HTH, Carl Am 24.01.2009 um 12:26 schrieb Tom Hall: James E. Bailey derhindemith at googlemail.com writes: Hello James I also get an error as follows when trying the code below: Regards Tom error: syntax error, unexpected SCM_TOKEN \concat { 4/char ##x2032 } %% { \mark \markup \rounded-box { \small { \concat { 4/char ##x2032 } } } c'2 } this would probaly be due to using a forward slash instead of a backwards slash in front of char yes, careless typo, however the below also gives an error Regards Tom { \mark \markup \rounded-box { \small { \concat { 4\char ##x2032 } } } c'2 } error: (process:440): Pango-WARNING **: Error loading GDEF table 28333 ... Wrong number of arguments to #procedure font-file-as-ps-string (name file-name font-index) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: insertion of UTF-8 characters
2008/10/14 Trevor Daniels [EMAIL PROTECTED]: I'll change the new examples I added today to use it, as you suggest. And remove the Scheme hack. Thanks. Thanks for the fix, Trevor. I'll flesh out the the \char example in the appendices a bit to demonstrate its usage better. Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: insertion of UTF-8 characters
Tom It has to be within a \markup and not in quotes. And xc2a9 should be 00a9. Try c'4^\markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) } or just \markup { Copyright 2008 #(ly:export (ly:wide-char-utf-8 #x00a9)) } outside the score block to place it in text, or for the copyright line, try copyright = \markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) 2008 } . Trevor - Original Message - From: Tom Cloyd [EMAIL PROTECTED] To: Lilypond lilypond-user@gnu.org Sent: Tuesday, October 14, 2008 2:08 AM Subject: insertion of UTF-8 characters The documentation [/Lilypond notation reference.pdf/, “3.3.3 Text encoding”, pdf p. 318.] states that UTF-8 coding is used in Ly and that UTF-8 hex codes can be inserted into text. An example is given, and I show it here using the code of interest to me - that for the Copyright sign: #(ly:export (ly:wide-char-utf-8 #xc2a9))| |This example has no context, and when I put it in one I cannot get it to work. I suggest that the documentation be modified to give one. Meanwhile, I need a solution to the problem of how to insert a Copyright sign into the copyright line. Here's what I tried: \header {... copyright = #(ly:export (ly:wide-char-utf-8 #xc2a9)) 2008 ... It produced this in the PDF output: #(ly:export (ly:wide-char-utf-8 #xc2a9)) 2008 Placing the UTF code export line outside of the quotes wouldn't even compile. Can anyone suggest how to do this? Thanks! Tom || -- ~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 [EMAIL PROTECTED] (email) TomCloyd.com (website) sleightmind.wordpress.com (mental health weblog) ~ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: insertion of UTF-8 characters
Hi Trevor, 2008/10/14 Trevor Daniels [EMAIL PROTECTED]: Tom It has to be within a \markup and not in quotes. And xc2a9 should be 00a9. Try c'4^\markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) } or just \markup { Copyright 2008 #(ly:export (ly:wide-char-utf-8 #x00a9)) } outside the score block to place it in text, or for the copyright line, try copyright = \markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) 2008 } For the docs examples, I think it would be better to replace the Scheme hack with \char, which uses ly:wide-char-utf-8 internally. c'4^\markup { \char ##xa9 } Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: insertion of UTF-8 characters
Neil Puttock wrote Tuesday, October 14, 2008 9:33 PM Hi Trevor, 2008/10/14 Trevor Daniels [EMAIL PROTECTED]: Tom It has to be within a \markup and not in quotes. And xc2a9 should be 00a9. Try c'4^\markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) } or just \markup { Copyright 2008 #(ly:export (ly:wide-char-utf-8 #x00a9)) } outside the score block to place it in text, or for the copyright line, try copyright = \markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) 2008 } For the docs examples, I think it would be better to replace the Scheme hack with \char, which uses ly:wide-char-utf-8 internally. c'4^\markup { \char ##xa9 } Absolutely! This -was- documented, I now realise, in App B.8.6, but I hadn't met it before. I'll change the new examples I added today to use it, as you suggest. And remove the Scheme hack. Thanks. Regards, Neil Trevor ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: insertion of UTF-8 characters
Good lord above, yes! THIS is immediately understandable if one has experience with a multitude of other programming languages, whereas that other approach is exasperating nonsense. Thanks, fellows, for chasing this one to ground. t. Trevor Daniels wrote: Neil Puttock wrote Tuesday, October 14, 2008 9:33 PM Hi Trevor, 2008/10/14 Trevor Daniels [EMAIL PROTECTED]: Tom It has to be within a \markup and not in quotes. And xc2a9 should be 00a9. Try c'4^\markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) } or just \markup { Copyright 2008 #(ly:export (ly:wide-char-utf-8 #x00a9)) } outside the score block to place it in text, or for the copyright line, try copyright = \markup { #(ly:export (ly:wide-char-utf-8 #x00a9)) 2008 } For the docs examples, I think it would be better to replace the Scheme hack with \char, which uses ly:wide-char-utf-8 internally. c'4^\markup { \char ##xa9 } Absolutely! This -was- documented, I now realise, in App B.8.6, but I hadn't met it before. I'll change the new examples I added today to use it, as you suggest. And remove the Scheme hack. Thanks. Regards, Neil Trevor ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- ~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 [EMAIL PROTECTED] (email) TomCloyd.com (website) sleightmind.wordpress.com (mental health weblog) ~ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
insertion of UTF-8 characters
The documentation [/Lilypond notation reference.pdf/, “3.3.3 Text encoding”, pdf p. 318.] states that UTF-8 coding is used in Ly and that UTF-8 hex codes can be inserted into text. An example is given, and I show it here using the code of interest to me - that for the Copyright sign: #(ly:export (ly:wide-char-utf-8 #xc2a9))| |This example has no context, and when I put it in one I cannot get it to work. I suggest that the documentation be modified to give one. Meanwhile, I need a solution to the problem of how to insert a Copyright sign into the copyright line. Here's what I tried: \header {... copyright = #(ly:export (ly:wide-char-utf-8 #xc2a9)) 2008 ... It produced this in the PDF output: #(ly:export (ly:wide-char-utf-8 #xc2a9)) 2008 Placing the UTF code export line outside of the quotes wouldn't even compile. Can anyone suggest how to do this? Thanks! Tom || -- ~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 [EMAIL PROTECTED] (email) TomCloyd.com (website) sleightmind.wordpress.com (mental health weblog) ~ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: insertion of UTF-8 characters
forgot this: I'm running Ly 2.11.60, on Kubuntu Linux 8.04.1 Tom Cloyd wrote: The documentation [/Lilypond notation reference.pdf/, “3.3.3 Text encoding”, pdf p. 318.] states that UTF-8 coding is used in Ly and that UTF-8 hex codes can be inserted into text. An example is given, and I show it here using the code of interest to me - that for the Copyright sign: #(ly:export (ly:wide-char-utf-8 #xc2a9))| |This example has no context, and when I put it in one I cannot get it to work. I suggest that the documentation be modified to give one. Meanwhile, I need a solution to the problem of how to insert a Copyright sign into the copyright line. Here's what I tried: \header {... copyright = #(ly:export (ly:wide-char-utf-8 #xc2a9)) 2008 ... It produced this in the PDF output: #(ly:export (ly:wide-char-utf-8 #xc2a9)) 2008 Placing the UTF code export line outside of the quotes wouldn't even compile. Can anyone suggest how to do this? Thanks! Tom || -- ~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 [EMAIL PROTECTED] (email) TomCloyd.com (website) sleightmind.wordpress.com (mental health weblog) ~ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user