Convert a UTF-8 character to a wide-character code
int utf8towc( wchar_t *pwc,
const char *s,
size_t n );
- A pointer to a location where utf8towc() stores the
wide-character representation of s.
- A pointer to a UTF-8 character.
- The maximum number of bytes to convert.
The utf8towc() function converts a single UTF-8 character pointed to
by s into a wide-character code pointed to by pwc, to a
maximum of n bytes.
This function is similar to
- utf8towc() isn't affected by the current locale.
- Neither pwc nor s is allowed to be
- You can pass 0 for n if you know that s points to
a null-terminated string (i.e. 0 is equivalent to, but more efficient than,
- utf8towc() doesn't set
- The s argument points to the null character.
- > 0
- The number of bytes that comprise the multibyte character, to a
maximum of UTF8_LEN_MAX (if the next n or fewer
bytes form a valid multibyte character).
- The next n bytes don't form a valid (complete) multibyte
Unicode Multilingual Support
in the Photon Programmer's Guide
in the QNX Neutrino Library Reference