|
@@ -5815,6 +5815,8 @@ typedef struct SDL_iconv_data_t *SDL_iconv_t;
|
|
|
* \returns a handle that must be freed with SDL_iconv_close, or
|
|
* \returns a handle that must be freed with SDL_iconv_close, or
|
|
|
* SDL_ICONV_ERROR on failure.
|
|
* SDL_ICONV_ERROR on failure.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety It is safe to call this function from any thread.
|
|
|
|
|
+ *
|
|
|
* \since This function is available since SDL 3.2.0.
|
|
* \since This function is available since SDL 3.2.0.
|
|
|
*
|
|
*
|
|
|
* \sa SDL_iconv
|
|
* \sa SDL_iconv
|
|
@@ -5830,6 +5832,8 @@ extern SDL_DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,
|
|
|
* \param cd The character set conversion handle.
|
|
* \param cd The character set conversion handle.
|
|
|
* \returns 0 on success, or -1 on failure.
|
|
* \returns 0 on success, or -1 on failure.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety It is safe to call this function from any thread.
|
|
|
|
|
+ *
|
|
|
* \since This function is available since SDL 3.2.0.
|
|
* \since This function is available since SDL 3.2.0.
|
|
|
*
|
|
*
|
|
|
* \sa SDL_iconv
|
|
* \sa SDL_iconv
|
|
@@ -5868,6 +5872,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
|
|
|
* \param outbytesleft The number of bytes in the output buffer.
|
|
* \param outbytesleft The number of bytes in the output buffer.
|
|
|
* \returns the number of conversions on success, or a negative error code.
|
|
* \returns the number of conversions on success, or a negative error code.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety Do not use the same SDL_iconv_t from two threads at once.
|
|
|
|
|
+ *
|
|
|
* \since This function is available since SDL 3.2.0.
|
|
* \since This function is available since SDL 3.2.0.
|
|
|
*
|
|
*
|
|
|
* \sa SDL_iconv_open
|
|
* \sa SDL_iconv_open
|
|
@@ -5903,6 +5909,8 @@ extern SDL_DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
|
|
|
* \param inbytesleft the size of the input string _in bytes_.
|
|
* \param inbytesleft the size of the input string _in bytes_.
|
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety It is safe to call this function from any thread.
|
|
|
|
|
+ *
|
|
|
* \since This function is available since SDL 3.2.0.
|
|
* \since This function is available since SDL 3.2.0.
|
|
|
*
|
|
*
|
|
|
* \sa SDL_iconv_open
|
|
* \sa SDL_iconv_open
|
|
@@ -5926,6 +5934,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
|
|
|
* \param S the string to convert.
|
|
* \param S the string to convert.
|
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety It is safe to call this macro from any thread.
|
|
|
|
|
+ *
|
|
|
* \since This macro is available since SDL 3.2.0.
|
|
* \since This macro is available since SDL 3.2.0.
|
|
|
*/
|
|
*/
|
|
|
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
|
|
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
|
|
@@ -5940,6 +5950,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
|
|
|
* \param S the string to convert.
|
|
* \param S the string to convert.
|
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety It is safe to call this macro from any thread.
|
|
|
|
|
+ *
|
|
|
* \since This macro is available since SDL 3.2.0.
|
|
* \since This macro is available since SDL 3.2.0.
|
|
|
*/
|
|
*/
|
|
|
#define SDL_iconv_utf8_ucs2(S) SDL_reinterpret_cast(Uint16 *, SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1))
|
|
#define SDL_iconv_utf8_ucs2(S) SDL_reinterpret_cast(Uint16 *, SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1))
|
|
@@ -5954,6 +5966,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
|
|
|
* \param S the string to convert.
|
|
* \param S the string to convert.
|
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety It is safe to call this macro from any thread.
|
|
|
|
|
+ *
|
|
|
* \since This macro is available since SDL 3.2.0.
|
|
* \since This macro is available since SDL 3.2.0.
|
|
|
*/
|
|
*/
|
|
|
#define SDL_iconv_utf8_ucs4(S) SDL_reinterpret_cast(Uint32 *, SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1))
|
|
#define SDL_iconv_utf8_ucs4(S) SDL_reinterpret_cast(Uint32 *, SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1))
|
|
@@ -5968,6 +5982,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode,
|
|
|
* \param S the string to convert.
|
|
* \param S the string to convert.
|
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
* \returns a new string, converted to the new encoding, or NULL on error.
|
|
|
*
|
|
*
|
|
|
|
|
+ * \threadsafety It is safe to call this macro from any thread.
|
|
|
|
|
+ *
|
|
|
* \since This macro is available since SDL 3.2.0.
|
|
* \since This macro is available since SDL 3.2.0.
|
|
|
*/
|
|
*/
|
|
|
#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", SDL_reinterpret_cast(const char *, S), (SDL_wcslen(S)+1)*sizeof(wchar_t))
|
|
#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", SDL_reinterpret_cast(const char *, S), (SDL_wcslen(S)+1)*sizeof(wchar_t))
|