Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

wctoutf8()

Convert a wide-character code into a UTF-8 character

Synopsis:

int wctoutf8( char *s,
              wchar_t wc );

Arguments:

s
A pointer to a location where wctoutf8() stores the UTF-8 character corresponding to wc.
wc
The wide character to be converted.

Library:

ph

Description:

The wctoutf8() function stores the multibyte representation corresponding to the code contained in wc in the array pointed to by s. This function stores at most MB_CUR_MAX characters.

The wctoutf8() function is similar to wctomb(), except:

Returns:

-1
The value of wc doesn't correspond to a valid multibyte character.
> 0
The number of bytes that comprise the multibyte character corresponding to the value of wc.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

utf8towc()

Unicode Multilingual Support in the Photon Programmer's Guide

wctomb() in the QNX Neutrino Library Reference