forked from rosebudai/OpenRCT2-Web
Fix ToUpper tests on Windows
LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
This commit is contained in:
1 parent
bf1fd997d0
commit
71a2cb46d2
2 files changed
+3
-3
No files matched your search
@@ -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