diff options
author | Jose <jose@zeroc.com> | 2021-01-07 23:22:18 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2021-01-07 23:25:00 +0100 |
commit | 90e5ee40ed094390db52cd51cdb8af2580b85fde (patch) | |
tree | 355e69d0bbe76cd998740dcea2ffb370b81cd8c2 | |
parent | Fixed Ice.wrap_future cancellation bug and added asyncio test (#1229) (diff) | |
download | ice-90e5ee40ed094390db52cd51cdb8af2580b85fde.tar.bz2 ice-90e5ee40ed094390db52cd51cdb8af2580b85fde.tar.xz ice-90e5ee40ed094390db52cd51cdb8af2580b85fde.zip |
Fix for Visual Studio unicode string litereal testing
-rw-r--r-- | cpp/msbuild/ice.cpp.props | 1 | ||||
-rw-r--r-- | cpp/test/Ice/proxy/AllTests.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/cpp/msbuild/ice.cpp.props b/cpp/msbuild/ice.cpp.props index ce1846187ea..9aad2473e84 100644 --- a/cpp/msbuild/ice.cpp.props +++ b/cpp/msbuild/ice.cpp.props @@ -159,6 +159,7 @@ <ItemDefinitionGroup Condition="'$(IceCppMapping)' == 'cpp11'"> <ClCompile> <PreprocessorDefinitions>ICE_CPP11_MAPPING;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalOptions Condition="'$(DefaultPlatformToolset)' == 'v141' OR '$(DefaultPlatformToolset)' == 'v142'">/utf-8 %(AdditionalOptions)</AdditionalOptions> </ClCompile> <ResourceCompile> diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index 1896c06357a..36a241ec92e 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -366,7 +366,9 @@ allTests(Test::TestHelper* helper) test(id == id2); // More unicode characters -#ifdef ICE_CPP11_MAPPING +#if defined(ICE_CPP11_MAPPING) && (!defined(_MSC_VER) || (_MSC_VER >= 1911)) + // To use unicode string literals with Visual Studio we need to build with /utf8 + // compiler option require Visual Studio 2017 or later id.name = "banana \016-\U0001F34C\U000020AC\u00a2\u0024"; id.category = "greek \U0001016A"; |