[Overview][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'LazUTF8' (#lazutils)

ConsoleToUTF8

Converts an OEM-encoded string to UTF8.

Declaration

Source position: lazutf8.pas line 53

function ConsoleToUTF8(

  const s: string

):string;

Arguments

s

  

Value to convert in the function.

Function result

UTF-8-encoded value for the specified string.

Description

ConsoleToUTF8 is a String function used to converts an OEM-encoded string to UTF8. The implementation of ConsoleToUTF8 is OS-specific, and essentially handles differences between various Windows platforms where use of OemToChar and WinCPToUTF8 are required. For UNIX-like environments, the value in s is converted by calling SysToUTF8.

ConsoleToUTF8 is used in the implementation of the GetEnvironmentStringUTF8 and GetEnvironmentVariableUTF8 functions.

See also

SysToUTF8

  

Converts strings (and format settings) from the system codepage to UTF-8.

WinCPToUTF8

  

Converts the string from Windows code page to UTF-8.

GetEnvironmentStringUTF8

  

Returns a system environment string.

GetEnvironmentVariableUTF8

  

Returns the value of a system environment variable.


Version 3.2 Generated 2024-02-25 Home