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

SysToUTF8

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

Declaration

Source position: lazutf8.pas line 49

function SysToUTF8(

  const s: string

):string; overload;

function SysToUTF8(

  const AFormatSettings: TFormatSettings

):TFormatSettings; overload;

Arguments

s

  

Values to examine in the function.

Function result

Values after conversion to UTF-8.

Arguments

AFormatSettings

  

Format settings to examine in the function.

Description

SysToUTF8 is an overloaded function used to convert strings (and format settings) from the system codepage to UTF-8. SysToUTF8 works like AnsiToUTF8, but has no reliance on the widestring manager on platforms where UTF8_RTL is defined. For platforms where UTF8_RTL is not defined, and NeedRTLAnsi contains True, non-ASCII values are converted to UTF-8 by calling AnsiToUTF8.

An overloaded variant of the function handles TFormatSettings for the platform. The return value for the function is the values specified in AFormatSettings after conversion from the system codepage to UTF-8. The values in the following format settings are updated: CurrencyString, LongMonthNames, ShortMonthNames, LongDayNames, and ShortDayNames.

See also

AnsiToUTF8

TFormatSettings


Version 3.2 Generated 2024-02-25 Home