mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 13:03:11 +01:00
Fix ToUpper tests on Windows
LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
This commit is contained in:
committed by
Aaron van Geffen
parent
bf1fd997d0
commit
71a2cb46d2
@@ -90,9 +90,9 @@ namespace String
|
||||
{
|
||||
#ifdef _WIN32
|
||||
int srcLen = (int)src.size();
|
||||
int sizeReq = MultiByteToWideChar(CP_ACP, 0, src.data(), srcLen, nullptr, 0);
|
||||
int sizeReq = MultiByteToWideChar(CODE_PAGE::CP_UTF8, 0, src.data(), srcLen, nullptr, 0);
|
||||
auto result = std::wstring(sizeReq, 0);
|
||||
MultiByteToWideChar(CP_ACP, 0, src.data(), srcLen, result.data(), sizeReq);
|
||||
MultiByteToWideChar(CODE_PAGE::CP_UTF8, 0, src.data(), srcLen, result.data(), sizeReq);
|
||||
return result;
|
||||
#else
|
||||
icu::UnicodeString str = icu::UnicodeString::fromUTF8(std::string(src));
|
||||
|
||||
Reference in New Issue
Block a user