Re: Unicode encoding issue for LilyPond engraving files
Gabriel Ellsworth <[email protected]>
| Newsgroups | gmane.comp.gnu.lilypond.general |
|---|---|
| Message-ID | <CAHavgtXN3AnqXaSysFUVcMuVcy0RocbVZDrHa6ARPCXOSnesaA@mail.gmail.com> |
Thank you, Max and Hans. I don’t have any experience with MIME declarations or websites, but I can offer my perspective as a frequent LilyPond user and end-user of CPDL, for what it’s worth. On Tue, 9 Jun 2026, Hans Åberg wrote: > A net search suggests that text/x-lilypond is correct, and text/lilypond, > without the “x-" experimental prefix, is acceptable; “text“ indicates it is > human-readable, so “application” should not be used. > I really like how Nancho Álvarez has set content-type as text on his website. As Hans noted, LilyPond files are human-readable, and it’s very convenient for me to be able to navigate to (for example) Partituras de Tomás Luis de Victoria <https://victoria.uma.es/partituras.html>, click on any “ly” link, and instantly view Álvarez’s LilyPond code within my browser. On Thu, 4 Jun 2026, Massimo Capozza wrote: > I think that the approach that is consistent with the other file types is > to add this statement to .htaccess: > > *AddType application/x-lilypond .ly* > > and then anybody can associate Frescobaldi (or any other application) to > the .ly extension on the client. > > If you agree, I can implement it and you can give it a try then. > On Tue, 9 Jun 2026, Massimo Capozza wrote: > As I mentioned in a previous email, we already have these MIME > declarations in .htaccess: > > > > > * AddType application/x-nwc nwc AddType application/x-sibelius-score > sib sco AddType application/octet-stream cap capx* > Normally, these declarations should directly open the file in the > application associated to the relevant file extension, which the user can > freely select on his/her computer. So, in the case of Lilypond, one may > select Frescobaldi, a text editor (e.g., Notepad++ that will immediately > detect the UTF-8 encoding), or whatever else. If no application is > associated, the file is downloaded "as is". This behaviour is in use since > many years, and nobody complained about it, so I think that it would be > fine for Lilypond, too, without introducing inconsistencies with other > music file formats. > > These are the reasons why I proposed to use "application/x-lilypond". > "text/x-lilypond" would also work, but just because the Lilypond files are > text files, it would not work for the other music file types. > If I could click (left-click) .ly files on CPDL and have them open immediately in Frescobaldi, that would also be convenient. *To summarize, it seems that there are two options for CPDL:* 1. Use text/x-lilypond for a UX like that of Álvarez’s website. 2. Use application/x-lilypond for consistency within CPDL across music-engraving file formats (LilyPond, Sibelius, NWC, etc.). Personally, I prefer option (1) because it is even more convenient for me than (2); I like being able to view .ly files within my browser. But either of these options would definitely be a significant improvement upon CPDL’s current state for me as a LilyPond user! Gabriel