RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideStrUtils.ConvertStreamFromUTF8ToAnsi Function

Converts a stream from UTF-8 to ANSI encoding.

Pascal
procedure ConvertStreamFromUTF8ToAnsi(Src: TStream; Dst: TStream; cp: integer = CP_ACP);
C++
ConvertStreamFromUTF8ToAnsi(TStream Src, TStream Dst, int cp = CP_ACP);

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. 

 

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