f046fed278
As I said in 2ff121f298
, passing a
POSIX-style locale name to the std::locale constructor on Windows is
decidedly odd, and apparently boost adds insult to injury by even
really attempting to use a UTF-8 one if that is what our code thinks
it wants. Or something.
This commit avoids the ton of
"warn:unotools.i18n:7996:3544:unotools/source/i18n/resmgr.cxx:123: CRT
Report Hook: ASSERT: f:\dd\vctools\crt\crtw32\stdcpp\xmbtowc.c(89) :
Assertion failed: ploc->_Mbcurmax == 1 || ploc->_Mbcurmax == 2" we
otherwise get when built with --enable-dbgutil and a current VS2015
(or 2017?).
Change-Id: I3a774dff7b12d9960f553c9f242e0463c6d13d5d
Reviewed-on: https://gerrit.libreoffice.org/54444
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
20 lines
713 B
Diff
20 lines
713 B
Diff
Don't ever attempt to initialise a std::locale with a UTF-8 locale on Windows -*- Mode: Diff -*-
|
|
|
|
--- libs/locale/src/std/std_backend.cpp
|
|
+++ libs/locale/src/std/std_backend.cpp
|
|
@@ -109,12 +109,13 @@
|
|
#endif
|
|
}
|
|
else {
|
|
+ #if !defined(BOOST_WINDOWS)
|
|
if(loadable(lid)) {
|
|
name_ = lid;
|
|
utf_mode_ = utf8_native_with_wide;
|
|
}
|
|
- #if defined(BOOST_WINDOWS)
|
|
- else if(loadable(win_name)) {
|
|
+ #else
|
|
+ if(loadable(win_name)) {
|
|
name_ = win_name;
|
|
utf_mode_ = utf8_from_wide;
|
|
}
|