diff --git a/unittest/stringrenderer_test.cc b/unittest/stringrenderer_test.cc index c778b480..67f1bcba 100644 --- a/unittest/stringrenderer_test.cc +++ b/unittest/stringrenderer_test.cc @@ -50,8 +50,9 @@ using tesseract::StringRenderer; class StringRendererTest : public ::testing::Test { protected: - void SetUp() { - std::locale::global(std::locale("")); + void SetUp() override { + static std::locale system_locale(""); + std::locale::global(system_locale); } static void SetUpTestCase() {