wctomb()

Translate a wchar_t type to a multibyte character encoded as defined by the LC_CTYPE category of the current locale.

  #include <stdlib.h>
  
  int wctomb(char *s, wchar_t wchar);    
Parameter

s

A pointer to a multibyte character string.

wchar

A wide character to convert.

Remarks

The EWL implementation of the wctomb() function converts a wchar_t type Unicode character to a multibyte character encoded as defined by the LC_CTYPE category of the current locale. If s is not a null pointer, the encoded multibyte character is stored in the array whose first element is pointed to by s. At most MB_CUR_MAX characters are stored. If wchar is a null wide character, a null byte is stored.

wctomb() returns 1 if s is not null and returns 0, otherwise it returns the number of bytes that are contained in the multibyte character stored in the array whose first element is pointed to by s.