From 6a080f1a6d1bfce8531de5bb3c40911c62e70568 Mon Sep 17 00:00:00 2001 From: MarcZX10 <67475268+MarcZX10@users.noreply.github.com> Date: Thu, 29 Oct 2026 07:11:37 +0000 Subject: [PATCH] test(libSceConvertKeycode): the IME keyboard type follows ANYPS5_LANGUAGE=auto With auto and a German host locale sceConvertKeycodeGetImeKeyboardType gives the IME type of German, and a later change of the host locale does not change it. --- core/libs/tests/GuestConvertKeycode.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/libs/tests/GuestConvertKeycode.cpp b/core/libs/tests/GuestConvertKeycode.cpp index d2d3cb463f..842bcf0eed 100644 --- a/core/libs/tests/GuestConvertKeycode.cpp +++ b/core/libs/tests/GuestConvertKeycode.cpp @@ -166,6 +166,16 @@ int main() { } SetLanguage("30"); Require(sceConvertKeycodeGetImeKeyboardType(0x10000000, &type) == 0 && type == 4); +#if defined(__linux__) + for (const char* name : {"LC_MESSAGES", "LANG", "LANGUAGE"}) Require(::unsetenv(name) == 0); + Require(::setenv("LC_ALL", "de_DE.UTF-8", 1) == 0); + SetLanguage("auto"); + type = 0xFFFFFFFFu; + Require(sceConvertKeycodeGetImeKeyboardType(0x10000000, &type) == 0 && type == imeTypeByLanguage[4]); + Require(::setenv("LC_ALL", "ja_JP.UTF-8", 1) == 0); + type = 0xFFFFFFFFu; + Require(sceConvertKeycodeGetImeKeyboardType(0x10000000, &type) == 0 && type == imeTypeByLanguage[4]); +#endif SetLanguage(nullptr); Require(ImeKeyboardType::IsPs4TitleId("CUSA00000"));