Next: , Up: Text markup



7.4.1 Text encoding

Texts can be entered in different encodings. The encoding of the file can be set with \encoding.

\encoding "latin1"

This command may be placed anywhere in the input file. The current encoding is passed as an extra argument to \markup commands, and is passed similarly to lyric syllables.

If no \encoding has been specified, then the encoding is taken from the \layout block (or \paper, if \layout does not specify encoding). The variable inputencoding may be set to a string or symbol specifying the encoding, e.g.

\layout {
  inputencoding = "latin1"
}

Normal strings, are unaffected by \encoding. This means that the following will usually not produce `Baßtuba' in the title.

\header {
  title = "Grazing cow"
  instrument = "Baßtuba"
}

Rather, you should say

instrument = \markup { Baßtuba }

or set inputencoding in the \paper block.

There is a special encoding, called TeX. This encoding does not reencode text for the font used. Rather, it tries to guess the width of TeX commands, such as \". Strings encoded with TeX are passed to the output back-end verbatim.

This page is for LilyPond-2.4.5 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.