I have checked this website.
It displays Unicode correctly in web pages.
But it does not display Unicode on text files

These two exemple files contain a accented character

 * Tra me così dicendo (i grave)
 * Copyright © 2026 by CPDL (copyright sign)

If one download the file instead of opening it, the characters are correct.
But not when displayed as text.

It is indeed quite a general problem (not limited to this particular website), due to the way text files are displayed in browsers)

I do not know how to correct this at the level or the websiste.

I have tested locally how text files are displayed, ans I have the same result... (using Firefox on Linux Ubuntu).

One work-around is to correct the text files by adding the *byte-order mark* (*BOM*) <https://en.wikipedia.org/wiki/Byte_order_mark> (it adds 3 bytes at the beginning of the file which indicates that the file is to be read in UTF-8 format (and in which ordre to read the groups of 2 bytes). This is quite easy and fast to do if one knows how, and does not affect the use of the file by Lilypond.

Here is a *test page with one of these files <https://silvain-dupertuis.org/test/lilypond/displaying-text-files.html>* - the original and the one with the BOM added, where one can see that this solves the problem. And it seems important to correct the problem, especially when it come to lyrics and any other language than English...




Le 02.06.26 à 15:10, Gabriel Ellsworth a écrit :

Dear ’Ponders,


Recently I have noticed an issue with how .ly files display in my browser when I view the LilyPond work that other editors kindly share on CPDL.


I have documented the issue, with links to several examples, in the CPDL Forums:


Unicode encoding issue for LilyPond engraving files (.ly) <https://forums.cpdl.org/phpBB3/viewtopic.php?f=1&t=14145>


The forum moderator wrote:

    processors like LilyPond and Frescobaldi show diacritics and … browsers 
don’t show them.


But this is incorrect, IIUC. As I mentioned in the forum, there is no problem with diacritics when I view in my browser the excellent work of Nancho Álvarez: https://victoria.uma.es/guerrero/ly/Guerrero-Adios_Verde_Ribera.ly <https://victoria.uma.es/guerrero/ly/Guerrero-Adios_Verde_Ribera.ly>.


I believe that CPDL shouldbe able to display files in UTF-8 withinbrowsers. But I know almost nothing about either Unicode or websites.


My questions for this list:

 1. By any chance, can anyone figure out *why* CPDL currently can’t display 
diacritics
    correctly?
 2. What would be required to fix/improve CPDL?

I ask these questions because I would like to be able to articulate and request the right solution in the forum.


Gabriel


P.S. If you happen to be a user of CPDL Forums already, feel free to chime in within the forum.


--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <https://perso.silvain-dupertuis.org>

Reply via email to