Close
dtSearch Text Retrieval Engine Programmer's Reference
dtssUtf8Encode Function

File: dtsearch.h

Syntax
C++
long DLLFUNC dtssUtf8Encode(char * dest, long destLen, const wchar_t * source, long sourceLen, long flags);
Parameters
Description
char * dest
Buffer to receive UTF-8 text
long destLen
Size of dest buffer
const wchar_t * source
Unicode text to convert
long sourceLen
Number of unicode characters to convert
long flags
Not used

Length of the output string, in bytes

Convert Unicode to UTF-8 (deprecated: use dtssUtf8Encode2)

Each Unicode character may be translated to as many as three Utf-8 characters, so to avoid truncation the output buffer should be at least 3 * sourceLen + 1 bytes.