Sign in Join
FPDoc Onlineexperiment

UTF8ToConsole function

In unit LazUTF8

Converts a UTF-8-encoded string to console (OEM) encoding.

Declaration

pascal
function UTF8ToConsole(const s: string): string

Arguments

s

UTF-8-encode input values.

Function result

OEM-encoded value for the string.

Description

UTF8ToConsole converts a UTF-8-encoded string to console (OEM) encoding as used in Write and WriteLn. The implementation is platform specific.

For the Windows environment, either UTF8ToSys or UTF8ToWinCP is used to convert the value to the codepage or character set needed in RTL. The Windows CharToOem API is used to prepare the return value. In UNIX-like environments, UTF8ToSys is used to get the return value .

See also

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