December 21, 2024

Dynamic Windows Function [dw_utf8_to_wchar]

Syntax

wchar_t * dw_utf8_to_wchar(char * utf8string)

Parameters

char * utf8string: UTF-8 encoded source string.

Returns

wchar_t * Wide string that needs to be freed with dw_free() or NULL on failure.

Description

Converts a UTF-8 encoded string into a wide string.

Remarks

Please note wchar_t may be 2 or 4 bytes depending on the platform. OS/2 and Windows are typically 2 bytes, Mac and Unix are typically 4 bytes.

This API was introduced in version 2.4.