From 4c2eb6b95d3cc3f9bba597450da00780aa7e750d Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 4 Nov 2023 12:00:38 -0700
Subject: [PATCH] Use the default UCS2/UCS4 conversion rather than non-portable
INTERNAL encoding
Fxies https://github.com/libsdl-org/SDL/issues/1497
(cherry picked from commit d07a264a9bc42bd2d92ce12fab55f1855d0e8277)
---
include/SDL_stdinc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index 47f609bb7e01..493597b0caa5 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -698,8 +698,8 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
const char *inbuf,
size_t inbytesleft);
#define SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
-#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
-#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
+#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
+#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)
#define SDL_iconv_wchar_utf8(S) SDL_iconv_string("UTF-8", "WCHAR_T", (char *)S, (SDL_wcslen(S)+1)*sizeof(wchar_t))
/* force builds using Clang's static analysis tools to use literal C runtime