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

Utf8ToAnsi

Convert a UTF-8 encoded unicode string to an ansistring

Declaration

Source position: ustringh.inc line 105

function Utf8ToAnsi(

  const s: UTF8String

):ansistring;

Description

Utf8ToAnsi converts an utf8-encode unicode string to an ansistring. It converts the string to a widestring and then converts the widestring to an ansistring.

For this function to work, a widestring manager must be installed.

See also

UTF8Encode

  

Convert a UTF-8 encoded unicode string to a widestring

UTF8Decode

  

Convert a widestring to a UTF-8 encoded unicode string

SetWideStringManager

  

Set the widestring manager

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