lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vowel with Umlaut


From: David Rogers
Subject: Re: Vowel with Umlaut
Date: Wed, 19 Oct 2011 12:01:02 -0700
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

Nick Payne <address@hidden> writes:
On 19/10/11 05:09, GRAEME F ST CLAIR wrote:
General reply to Messrs Rogers, Peekay and Kastrup! In the end I googled lilypond and found the \char approach myself. Right now, I'm settling for it, because as DK hints, both TextPad and jEdit will save UTF-8 just fine, but the next time you open the file, you see mysterious blobs, not the intended character. That's why I committed "mangling" on my previous project! But I intend to re-visit some German songs I lily'ed a few years ago, and obviously \char won't really hack it - I like the suggestion of Emacs, and will go looking for it.

jEdit works fine for me on both Linux and Windows in preserving extended characters across editing sessions. Just open Global Options from the Utilities menu and make sure that under encodings the default character encoding is UTF-8.

Most editors should preserve text when you edit in the correct encoding. The advantage of Emacs is that it is rather good at preserving the _byte_ stream of unedited text even when in the wrong encoding (Emacs actually also is rather good at detecting the coding of a file, so you are not all that likely to even start creating mish-mash files even if you don't realise that somebody sent you something differently encoded from what you expect). So if you edit a file as utf-8 and have some latin-1 passages in it originally, the latin-1 passages will still be the same when you open the file as latin-1, or finally discover them and use M-x recode-region RET on them, telling Emacs that the characters were really latin-1 and wrongly interpreted as utf-8. Other editors turn latin-1 passages into increasingly unrecoverable crap each time you load and save under utf-8. The wrongness of the encoding _deteriorates_. If your file is encoded inconsistently in different parts, Emacs can't magically fix this, but it won't make the situation worse. And that is quite comforting.

This does cover the difficult cases better than most.

However, most of us most of the time should stay away from creating difficult cases for ourselves in the first place. This can be accomplished (for Lilypond and many others) simply by using a UTF-8-capable editor, setting it (on the first day of use) to always create UTF-8, and starting work from there.

JEdit has worked fine for me with Lilypond files in the past. So has Vim. So has Emacs. And TextMate. And probably quite a few others work fine as well. No matter what editor you choose, getting the encoding settings right initially (namely, find an option that says "use UTF-8 all the time without asking" and choose it) is a big deal in terms of saving yourself headaches in the future.

If you have a large & complex file that's encoded in some other encoding, you're in for a lot of extra work. Emacs may help that.


I don't believe there is any good reason for a non-programmer to be using 
anything other than Unicode (usually as UTF-8, but whichever way the particular 
system wants to handle Unicode) for day-to-day things. The limitations of ASCII 
made perfect sense, in 1976. Last I checked, it isn't 1976. :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]