AnsiToUtf8

See Also: Utf8ToAnsi, String Functions

Purpose

Converts a string encoded in the ANSI character format to UTF-8.

Return Type

String

Syntax

Use CharTranslate.pkg

 

(AnsiToUtf8( {stringValue} ))

Where:

What It Does

 DataFlex strings are by default encoded as UTF-8. When working with external APIs or when importing data, it is sometimes necessary to convert strings from ANSI to UTF-8.

Examples

Procedure Test

    String sAnsiString sValue

 

    // move an ANSI encoded string to sAnsiString

 

    Move (AnsiToUtf8(sAnsiString)) to sValue

End_Procedure