diff --git a/src/api/baseapi.cpp b/src/api/baseapi.cpp index 82e3e33ef7..b17fe2d2c9 100644 --- a/src/api/baseapi.cpp +++ b/src/api/baseapi.cpp @@ -43,6 +43,7 @@ #endif // _WIN32 #include +#include #include #include #include @@ -185,7 +186,15 @@ TessBaseAPI::TessBaseAPI() rect_width_(0), rect_height_(0), image_width_(0), - image_height_(0) {} + image_height_(0) { + const char *locale; + locale = std::setlocale(LC_ALL, nullptr); + ASSERT_HOST(!strcmp(locale, "C")); + locale = std::setlocale(LC_CTYPE, nullptr); + ASSERT_HOST(!strcmp(locale, "C")); + locale = std::setlocale(LC_NUMERIC, nullptr); + ASSERT_HOST(!strcmp(locale, "C")); +} TessBaseAPI::~TessBaseAPI() { End();