RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideStrUtils.Utf8ToAnsiEx Function

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

Pascal
function Utf8ToAnsiEx(const S: UTF8String; const cp: integer): AnsiString;
C++
AnsiString Utf8ToAnsiEx(const UTF8String S, const int cp);

Utf8ToAnsiEx converts the string specified by S to ANSI. The code page of the output string is specified by the cp parameter.  

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

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!