[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'System' (#rtl)

AnsiToUtf8

Convert ansi string to UTF-8 string

Declaration

Source position: ustringh.inc line 104

function AnsiToUtf8(

  const s: ansistring

):UTF8String;

Description

AnsiToUtf8 converts the ansistring S to a UTF-8 format, that is, it converts the string from whatever codepage is currently in use, to UTF-8.

The current codepage is fetched from the system, if internationalization support is enabled. It can be UTF-8, in which case the function simply returns S.

Errors

None.

See also

Utf8toAnsi

  

Convert a UTF-8 encoded unicode string to an ansistring

The latest version of this document can be found at lazarus-ccr.sourceforge.net.