RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.UTF8Encode Function

Converts a WideString value to a UTF8 string.

Pascal
function UTF8Encode(const WS: WideString): RawByteString; overload;
function UTF8Encode(const US: UnicodeString): RawByteString; overload;
function UTF8Encode(const A: RawByteString): RawByteString; overload;
C++
RawByteString UTF8Encode(const BSTR WS);
RawByteString UTF8Encode(const UnicodeString US);
RawByteString UTF8Encode(const RawByteString A);

Call UTF8Encode to convert a Unicode string to UTF-8. WS is the Unicode string to convert. Utf8Encode returns the corresponding UTF-8 string. 

 

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