Utf8ToUnicode
Convert a buffer with UTF-8 characters to widestring characters
Declaration
Source position: ustringh.inc line 136
function Utf8ToUnicode(Dest: PUnicodeChar; Source: PChar;
MaxChars: SizeInt) : SizeInt;
function Utf8ToUnicode(Dest: PUnicodeChar; MaxDestChars: SizeUInt;
Source: PChar; SourceBytes: SizeUInt) : SizeUInt;
function Utf8ToUnicode(Dest: PUnicodeChar; MaxDestChars: SizeUInt;
Source: PChar; SourceBytes: SizeUInt;
IgnoreInvalid: Boolean) : SizeUInt;
Description
Utf8ToUnicode converts the buffer in Source with a length of SourceBytes or for a maximum length of MaxChars (or MaxDestChars) widestring characters to the buffer pointed to by Dest.
The function returns the number of copied widestring characters.
Errors
On error, -1 is returned.
See also
Name | Description |
---|---|
SetWideStringManager | Set the widestring manager |
UTF8Decode | Convert an UTF-8 encoded ansistring to a unicodestring |
UTF8Encode | Convert a widestring or unicodestring to an UTF-8 encoded ansistring |
Utf8ToAnsi | Convert a UTF-8 encoded Unicode string to an ansistring |