System.WideStrUtils.AnsiToUtf8Ex

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function AnsiToUtf8Ex(const S: AnsiString; const cp : integer): UTF8String;

C++

extern DELPHI_PACKAGE System::UTF8String __fastcall AnsiToUtf8Ex(const System::AnsiString S, const int cp);

Properties

Type Visibility Source Unit Parent
function public
System.WideStrUtils.pas
System.WideStrUtils.hpp
System.WideStrUtils System.WideStrUtils

Description

Converts a string encoded in ANSI to UTF-8 with a given code page.

AnsiToUtf8Ex converts the string specified by S to UTF-8. The code page used by the input AnsiString is specified in the cp parameter.

If the specified code page is CP_UTF8 then a direct assignment is made; otherwise a conversion is performed.

See Also