Skip to content

UTF8_to_Widechar_Ex

UTF8_to_Widechar converts a UTF-8 string into a UCS2 string.

Prototype

void UTF8_to_Widechar_Ex(
    const char* source,
    IGR_LONG sourceLen,
    IGR_UCS2* buffer,
    IGR_LONG bufferSize
)

Parameters

source: Pointer to char

Contains a NULL terminated UTF-8 string.

sourceLen: IGR_LONG

Indicate the size of the buffer pointed to by source, in bytes.

buffer: Pointer to IGR_UCS2

Pointer to a buffer that will hold the converted text.

bufferSize: IGR_LONG

Indicates the size of the buffer, the system will copy up to this size including the NULL.

Return value

Success: IGR_LONG

Returns IGR_OK.

Failure: IGR_LONG

Returns one of the possible IGR_E error codes.