Sign in Join
FPDoc Onlineexperiment

GetConsoleTextEncoding function

In unit LConvEncoding

Gets the encoding used for a console application on the platform.

Declaration

pascal
function GetConsoleTextEncoding: string

Function result

Name of the encoding used for text in a console application.

Description

GetConsoleTextEncoding is String function which gets the encoding name used for console applications.

The return value may differ from the normal system encoding on some Windows versions, where the OEM code page is used for a console application. For more details, see: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/20552.

For all other platforms, the value from GetDefaultTextEncoding is used in the return value. The return value is normalized (hyphen characters removed and converted to lowercase).

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.