I
I
Ivan Tishchenko2014-03-04 11:26:36
linux
Ivan Tishchenko, 2014-03-04 11:26:36

How to output Cyrillic strings in Free Pascal?

It is necessary to write a training program for study, the menu of which should contain Cyrillic and display in graphical mode.
PTCCRT, Dos and PTCGraph modules are used. I changed the encoding of the source code file (ANSI/CP866/Windows 1251/UTF-8).
OS: Archlinux
FPC Version - 2.6.
I write the source code in Geany.
How can I add Cyrillic to the source code?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
v_prom, 2014-03-04
@v_prom

Free Pascal can use two types of characters that make up strings: one-byte and two-byte. For the former, there is the Char type (aka AnsiChar), for the latter, WideChar. And respectively: string, AnsiString, WideString, PChar and PWideChar. Thus, we can use one- and two-byte encodings, both limited and with a variable character size, since the null character, which has a special meaning, is the same everywhere.

V
v_prom, 2014-03-04
@v_prom

the easiest option is to use Lazarus, everything should be displayed correctly there..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question