Sign in Join
FPDoc Onlineexperiment

UnicodeToWinCP function

In unit LazUnicode

Converts the specified value to the Windows system codepage.

Declaration

pascal
function UnicodeToWinCP(const s: string): AnsiString

Arguments

s

Unicode values to convert in the function.

Function result

Values after conversion to the Windows code page.

Description

Converts the specified value to the Windows system codepage. The Unicode encoding used in s depends on the modeswitch value. For platforms that require UTF-16, UTF16ToUTF8 and UTF8ToWinCP are called to get the return value for the function, except when String is defined as UnicodeString. No conversion is required in that situation. For other platforms, UTF8ToWinCP is called to get the return value.

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