[Libreoffice-commits] core.git: tell msvc our source code is written using utf-8
Stephan Bergmann
sbergman at redhat.com
Thu Aug 17 08:33:02 UTC 2017
On 07/25/2017 04:36 PM, Caolán McNamara wrote:
> commit 9a7d2d72cef7ff14a020c1024fbff8c00e4e4aff
> Author: Caolán McNamara <caolanm at redhat.com>
> Date: Sat Jul 22 12:52:34 2017 +0100
>
> tell msvc our source code is written using utf-8
>
> Change-Id: I4fb364ceb34e0851f2d04c403333bf428e8cfa98
> Reviewed-on: https://gerrit.libreoffice.org/40305
> Tested-by: Jenkins <ci at libreoffice.org>
> Reviewed-by: Caolán McNamara <caolanm at redhat.com>
> Tested-by: Caolán McNamara <caolanm at redhat.com>
>
[...]
> diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
> index 7f184c6be057..9aa1435a5a94 100644
> --- a/solenv/gbuild/platform/com_MSC_defs.mk
> +++ b/solenv/gbuild/platform/com_MSC_defs.mk
> @@ -132,6 +132,7 @@ gb_AFLAGS := $(AFLAGS)
> # warning)
>
> gb_CFLAGS := \
> + -utf-8 \
> -Gd \
> -GR \
> -Gs \
> @@ -161,6 +162,7 @@ gb_CFLAGS += \
> endif
>
> gb_CXXFLAGS := \
> + -utf-8 \
> -Gd \
> -GR \
> -Gs \
> diff --git a/vcl/qa/cppunit/mnemonic.cxx b/vcl/qa/cppunit/mnemonic.cxx
> index fb8bc8c454ac..4527d2ed1784 100644
> --- a/vcl/qa/cppunit/mnemonic.cxx
> +++ b/vcl/qa/cppunit/mnemonic.cxx
> @@ -33,8 +33,7 @@ void VclMnemonicTest::testMnemonic()
> MnemonicGenerator aGenerator;
>
> {
> - const sal_Unicode TEST[] = { 0x00DF, 'a' };
> - OUString sResult = aGenerator.CreateMnemonic(OUString(TEST, SAL_N_ELEMENTS(TEST)));
> + OUString sResult = aGenerator.CreateMnemonic(OUString::fromUtf8(u8"ßa"));
Are we confident that all relevant toolchains treat C++ source files as
UTF-8 now? How about e.g. Linux, where I could imagine that GCC/Clang
would base their behavior on LC_* env vars?
More information about the LibreOffice
mailing list