Converts a string of Unicode characters into a UTF-8 string.
function UnicodeToUtf8(Dest: PChar; Source: PWideChar; MaxBytes: Integer): Integer; overload; deprecated; function UnicodeToUtf8(Dest: PChar; MaxDestBytes: Cardinal; Source: PWideChar; SourceChars: Cardinal): Cardinal; overload;
int UnicodeToUtf8(const char * Dest, PWideChar Source, int MaxBytes); unsigned UnicodeToUtf8(const char * Dest, unsigned MaxDestBytes, PWideChar Source, unsigned SourceChars);
System
Call UnicodeToUtf8 to convert a Unicode string to a null-terminated sequence of UTF-8 characters. Use the second syntax. The deprecated syntax is included only for backward compatibility.
Dest receives the resulting null-terminated array of UTF-8 characters.
MaxDestBytes or MaxBytes indicates the number of bytes available in the buffer specified by Dest, including the byte for the null terminator.
Source is an array of Unicode characters.
SourceChars is the number of characters in Source. If SourceChars is not specified, Source must be null-terminated.
UnicodeToUtf8 returns the number of bytes written to Dest.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|