On Sun 07 Jun 2026 at 18:50:27 (+0200), Hans Aikema wrote: > > Op 7 jun 2026 om 16:50 heeft David Wright het volgende geschreven: > > On Sat 06 Jun 2026 at 21:40:49 (+0200), Silvain Dupertuis wrote: > >> It looks like this site : https://victoria.uma.es, display .ly files > >> correctly (that is, Unicode encoding). > >> > >> It probably means that vi[c]toria.uma.es is correctly set > > > > Yes, set—and also set correctly. > > . > > […] > >> Actually, these settings are at the level of the Apache server and/or > >> on an .htaccess file at the root of the website, so that when CPDL > >> displays files stored on victoria.uma.es website, they will be > >> displayed according to the settings of victoria.uma.es, not those of > >> cdpl... > > > > As CPDL serves files with different character sets, it wouldn't be > > appropriate to set charset=utf-8 "at the root of the website", ie > > for all files on CPDL. (BTW, CPDL doesn't serve/display files stored > > on the victoria.uma.es website: the victoria.uma.es server does.) > > > > It is perfectly possible to configure charset=utf-8 for lilypond files only, > no need to set it for all (text) files, it can easily be restricted to .ly > files only.
Why would you do that when CPDL can download https://www.cpdl.org/wiki/images/e/eb/Alma-2026-02.ly UTF-8 https://www.cpdl.org/wiki/images/9/9f/Ledoulxbaisir.ly Windows-1252 files? As you already wrote, "if they can be in any encoding there is essentially nothing that CPDL can do as they also wouldn't know whether the author encoded the text with utf-8, iso-8859-1, iso-8859-15 or even other encodings common in non-latin-alphabet regions". Well, CPDL can leave it to you and your browser to guess. I think that's better than announcing charset=utf-8 with a file that isn't. > Lilypond will not render properly when using special characters unless you > code your file in utf-8. So lilypond files are either 'usascii characters > only' in which case a utf-8 encoding is safe to interpret it or they contain > special characters in which case they will be encoded as utf-8 as that is the > only encoding supported by lilypond. Making the assumption "they will be encoded as utf-8" is unsafe. > There are no good reasons for CPDL (other than 'not yet configured') to not > serve it with an explicit charset of utf-8 as it is 100% safe for all > lilypond files and required for proper display of lilypond files with special > characters. That seems to directly contradict what you wrote in https://lists.gnu.org/archive/html/lilypond-user/2026-06/msg00039.html The good news for Western languages is that the Python program convert-ly (likely needed for legacy¹ files) reads source files in binary and, if conversion to utf-8 fails, attempts to convert the file from Latin-1 to utf-8 (and regularise line-endings). ¹ I /assume/ CPDL only accepts utf-8 text for uploading nowadays. Cheers, David.
