Add a workaround for failed assertion in VS debugger
Assertion failed: ploc->_Mbcurmax == 1 || ploc->_Mbcurmax == 2 Apparently MS C/C++ library doesn't support UTF-8 locales, which causes the assertion to fail. My solution is to ignore the system locale and try to set the classic one. LibreOffice seems to have this problem fixed in less simple way: https://gerrit.libreoffice.org/#/c/54110/1008-fix
parent
32d3d1eb92
commit
cb701cacb8
|
@ -1832,7 +1832,12 @@ void CApplication::SetLanguage(Language language)
|
||||||
// Update C++ locale
|
// Update C++ locale
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
#if defined(_MSC_VER) && defined(_DEBUG)
|
||||||
|
// Avoids failed assertion in VS debugger
|
||||||
|
throw -1;
|
||||||
|
#else
|
||||||
std::locale::global(std::locale(systemLocale.c_str()));
|
std::locale::global(std::locale(systemLocale.c_str()));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue