mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 02:41:58 -05:00
Fix ToUpper tests on Windows
LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
This commit is contained in:
parent
bf1fd997d0
commit
71a2cb46d2
2 changed files with 3 additions and 3 deletions
|
@ -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));
|
||||
|
|
|
@ -126,7 +126,7 @@ TEST_F(StringTest, ToUpper_Basic)
|
|||
}
|
||||
TEST_F(StringTest, ToUpper_Dutch)
|
||||
{
|
||||
auto actual = String::ToUpper(u8"fijntjes puffend fietsen");
|
||||
auto actual = String::ToUpper(u8"fijntjes puffend fietsen");
|
||||
ASSERT_STREQ(actual.c_str(), u8"FIJNTJES PUFFEND FIETSEN");
|
||||
}
|
||||
TEST_F(StringTest, ToUpper_French)
|
||||
|
|
Loading…
Reference in a new issue