Links
dtSearch Text Retrieval Engine Programmer's Reference 7.70
dtssUtf8Encode Function
Functions | Send Feedback

Convert Unicode to UTF-8

long DLLFUNC dtssUtf8Encode(char * dest, long destLen, const wchar_t * source, long sourceLen, long flags);
File

dtsearch.h

Parameters
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 
Returns

Length of the output string, in bytes

Remarks

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.

Group
Links
You are here: C++ API > Functions > dtssUtf8Encode Function
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.