Skip to content

Commit

Permalink
Remove /source-charset:utf-8 compile option.
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
  • Loading branch information
phprus committed Jun 17, 2022
1 parent eaa8efb commit 2dec732
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions test/CMakeLists.txt
Expand Up @@ -78,9 +78,6 @@ add_fmt_test(printf-test)
add_fmt_test(ranges-test ranges-odr-test.cc)
add_fmt_test(scan-test)
add_fmt_test(std-test)
if (MSVC)
target_compile_options(std-test PRIVATE /source-charset:utf-8)
endif ()
add_fmt_test(unicode-test HEADER_ONLY)
if (MSVC)
target_compile_options(unicode-test PRIVATE /utf-8)
Expand Down
6 changes: 5 additions & 1 deletion test/std-test.cc
Expand Up @@ -16,7 +16,11 @@ TEST(std_test, path) {
"\"foo\\\"bar.txt\"");

# ifdef _WIN32
EXPECT_EQ(fmt::format("{}", std::filesystem::path(L"Файл.txt")),
// File.txt in Russian.
// Do not use utf-8 encoded chars in this file.
const wchar_t unicode_path[] = {0x424, 0x430, 0x439, 0x43b, 0x2e,
0x74, 0x78, 0x74, 0};
EXPECT_EQ(fmt::format("{}", std::filesystem::path(unicode_path)),
"\"\xd0\xa4\xd0\xb0\xd0\xb9\xd0\xbb.txt\"");
# endif
#endif
Expand Down

0 comments on commit 2dec732

Please sign in to comment.