RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideStrUtils.ConvertStreamFromAnsiToUTF8 Function

Converts a stream from ANSI to UTF-8 encoding.

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

ConvertStreamFromAnsiToUTF8 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 ANSI and converts it to UTF-8. Optionally, the code page of the input 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!