#include "ltocr.h"
L_LTOCR_API L_INT EXT_FUNCTION L_OcrEncoding_ToUTF8(source, sourceCount, dest, destCount)
Maps a UTF-16 (wide character) string to a new character string. The new character string is not necessarily from a multibyte character set.
Pointer to the Unicode string to convert.
Size, in characters, of the string indicated by 'source'.
Pointer to a buffer that receives the converted string.
Size, in bytes, of the buffer indicated by 'dest'.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Maps a UTF-16 (wide character) string to a new character string. The new character string is not necessarily from a multibyte character set.
This function internally calls WideCharToMultiByte function to do the conversion, so for more information about this function, refer to MSDN.
Required DLLs and Libraries
This example shows how to map a UTF-16 (wide character) string to a new character string. The new character string is not necessarily from a multi-byte character set.
L_INT L_OcrEncoding_ToUTF8Example(const L_WCHAR* source, L_UINT sourceCount, L_CHAR* dest, L_UINT destCount)
{
L_OcrEncoding_ToUTF8(source, sourceCount, dest, destCount);
return SUCCESS;
}