L_OcrEncoding_FromUTF8

#include "ltocr.h"

L_LTOCR_API L_INT EXT_FUNCTION L_OcrEncoding_FromUTF8(source, sourceCount, dest, destCount)

Maps a character string to a UTF-16 (wide character) string. The character string is not necessarily from a multibyte character set.

Parameters

const L_CHAR* source

Pointer to the character string to convert.

L_UINT sourceCount

Size, in bytes, of the string indicated by the 'source' parameter.

L_WCHAR* dest

Pointer to a buffer that receives the converted string.

L_UINT destCount

Size, in characters, of the buffer indicated by 'dest'.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Maps a character string to a UTF-16 (wide character) string. The character string is not necessarily from a multibyte character set.

This function internally calls MultiByteToWideChar function to do the conversion, so for more information about this function, refer to MSDN.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example shows how to map a character string to a UTF-16 (wide character) string.
The character string is not necessarily from a multi-byte character set.

L_INT L_OcrEncoding_FromUTF8Example(const L_CHAR* source, L_UINT sourceCount, L_WCHAR* dest, L_UINT destCount) 
{ 
   L_OcrEncoding_FromUTF8(source, sourceCount, dest, destCount); 
   return SUCCESS; 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.