Fix ToUpper tests on Windows

LCMapStringEx does not unfold ligatures if there is no uppercase equivalent.
This commit is contained in:
Ted John authored and Aaron van Geffen committed 2018-05-22 17:37:07 +02:00
1 parent bf1fd997d0
commit 71a2cb46d2
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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));
+1 -1
View File
@@ -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)