Skip to content

Utf8ToAnsi

Convert a UTF-8 encoded Unicode string to an ansistring.

Declaration

Source position: ustringh.inc line 186

function Utf8ToAnsi(const s: RawByteString) : RawByteString;

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

Name Description
UTF8Encode Convert a widestring or unicodestring to an UTF-8 encoded ansistring.
UTF8Decode Convert an UTF-8 encoded ansistring to a unicodestring.
SetWideStringManager Set the widestring manager.