Msc-generator supports international text via both UTF-8 and UTF-1626. The type of encoding is determined automatically when the file is loaded. If it is ASCII or valid UTF-8, it is treated as so. Else it is treated as UTF-16. The Windows GUI displays the detected encoding on the status bar. You can change it by double clicking the indicator on the status bar - next time you save the file, it will be saved using the encoding displayed there. Below is an example of a simple chart shown in the language tutorial in my native language, Hungarian.
![]() | ![]() |
The CLI GUI only supports UTF-8.
Note that not all font faces contain characters for all possible unicode codepoints. This has to be considered when selecting a font27. If you mix characters of different languages, you need to ensure that they are displayed via a font that has coverage for all those characters.
In labels, you can use the \$
escape followed by exactly four hexadecimal digits,
to insert any unicode character to a label, e.g., \$00a9
inserts the copyright
symbol.
Note that if you plan to use non-ASCII characters in the chart text you need to select a font that can display them not only in the chart, but also for the internal editor. See Fonts.
UTF-8 is a superset of ASCII, where international characters are encoded in multiple bytes all larger than 127 (which is the largest ASCII character). In contrast, in UTF-16 all characters are encoded on two bytes, ASCII and international characters alike. The UTF-16 file usually start by the characters 0xff and 0xfe and their order determines in which order the two bytes of a character comes. UTF-8 is widely used in Linux and other Unix systems, whereas Windows has adopted UTF-16 as the system encoding. Msc-generator supports both file formats and both byte orders of UTF-16.
In signalling charts you
can select a font via the text.font.face
chart option or attribute,
in graphs use the fontname
attribute, whereas in Block Diagrams you need
use text.font.face=<fonname>;
. On Linux/Mac, where fontconfig
is used
to select the fonts, specifying the text.font.lang
attribute along with the
font face (see Fonts), will try to select a font having glyphs for the specified language.