System.WideStrUtils.ConvertStreamFromUTF8ToAnsi

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure ConvertStreamFromUTF8ToAnsi(Src, Dst : TStream; cp : Integer);

C++

extern DELPHI_PACKAGE void __fastcall ConvertStreamFromUTF8ToAnsi(System::Classes::TStream* Src, System::Classes::TStream* Dst, int cp = 0x0);

Properties

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

Description

Converts a stream from UTF-8 to ANSI encoding.

ConvertStreamFromUTF8ToAnsi converts an input stream specified by Src to an output stream specified by Dst. The function assumes that the input stream contains text encoded in UTF-8 and converts it to ANSI. Optionally, the code page of the output ANSI stream is specified.

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

See Also