Convert a character to a wide character (restartable)
This function uses most n bytes beginning from pSrc to determine the number of bytes needed to complete the next character (including any shift sequences). If the function determines that the next character is completed, it determines the value of the corresponding wide character and then, stores that value in the buffer pointed to by pDst.
If pMbs is NULL, then this function uses its own internal mbstate_t object, which is initialised at program startup to the initial conversion state.
- Parameters
-
pDst | [ out ] Pointer to the buffer to write the resulting wide character. |
pSrc | [ in ] Pointer to multibyte character string to convert. |
n | [ in ] The n bytes examined from pSrc for conversion. |
pMbs | [ in ] Pointer to object set up by a call to mbsinit(). |
pResultSize | [ out ] If function is successful and the next n or fewer bytes complete a valid character, then the value returned is the number of bytes that complete the character. This length is necessary for the caller to increment to the next UTF8 character. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eFail | Unable to perform the conversion. |
P6R::eNotInitialized | A successful call to initialize was not made before this call. |