Normally consoles on Linux use UTF8-codepage, but sometimes I use a GNOME-console which is configured to use good old DOS-codepage (CP850).
My question is: is it possible for a running FPC console program to detect the codepage, which is configured in the console, from where the program was started?
I tried already:
writeln('DefaultSystemCodePage=', DefaultSystemCodePage);
writeln('Console codepage: ', GetTextCodePage(OUTPUT));
but in both consoles they show '0'.
I use FPC 3.2.0. Thanks in advance.