This function converts text between encodings, reading from and writing to a buffer.
Defined in <SDL3/SDL_stdinc.h>
size_t SDL_iconv(SDL_iconv_t cd, const char **inbuf,
size_t *inbytesleft, char **outbuf,
size_t *outbytesleft);
SDL_iconv_t | cd | The character set conversion context, created in SDL_iconv_open(). |
const char ** | inbuf | Address of variable that points to the first character of the input sequence. |
size_t * | inbytesleft | The number of bytes in the input buffer. |
char ** | outbuf | Address of variable that points to the output buffer. |
size_t * | outbytesleft | The number of bytes in the output buffer. |
(size_t) Returns the number of conversions on success, else SDL_ICONV_E2BIG is returned when the output buffer is too small, or SDL_ICONV_EILSEQ is returned when an invalid input sequence is encountered, or SDL_ICONV_EINVAL is returned when an incomplete input sequence is encountered.
On exit:
It returns the number of succesful conversions.
This function is available since SDL 3.1.3.