DefaultSystemCodePage variable
Current system codepage.
Declaration
DefaultSystemCodePage: TSystemCodePageDescription
DefaultSystemCodePage is used to determine how
CP_ACP is
interpreted; it is what the program considers to be the current system
codepage.
It is initialized to the default system codepage.
- On windows, this is the result of the
GetACPoperating call, which returns the Windows ANSI code page. - On iOS, this is UTF-8
- on other Unixes this will be based on the currently
set
LANGorLC_CTYPEenvironment variables. Normally this is UTF-8, but that is not guaranteed to be the case. - For all other platforms it is set to CP_ACP, as these platforms currently do not support multiple code pages, and are hardcoded to use their OS-specific code page in all cases.
The DefaultSystemCodePage value may be set using SetMultiByteConversionCodePage.
That means that it is not a good idea to use its value to determine the real OS "default system code
page".
Note that if you change DefaultSystemCodePage, you should call TEncoding.FreeEncodings
to free the encodings that were created. They will be recreated with the correct (new) DefaultSystemCodePage.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
