Skip to content

Commit

Permalink
Remove default locale setting in debug config. Any locale errors must…
Browse files Browse the repository at this point in the history
… be fixed separately (if any).

Fixes #3290.
  • Loading branch information
egorpugin committed Mar 24, 2021
1 parent 60d2516 commit 7c975a0
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,20 +228,6 @@ TessBaseAPI::TessBaseAPI()
, rect_height_(0)
, image_width_(0)
, image_height_(0) {
#if !defined(NDEBUG)
// The Tesseract executables would use the "C" locale by default,
// but other software which is linked against the Tesseract library
// typically uses the locale from the user's environment.
// Here the default is overridden to allow debugging of potential
// problems caused by the locale settings.

// Use the current locale if building debug code.
try {
std::locale::global(std::locale(""));
} catch (const std::runtime_error &ex) {
fprintf(stderr, "Warning: Could not set the current locale\n");
}
#endif
}

TessBaseAPI::~TessBaseAPI() {
Expand Down

0 comments on commit 7c975a0

Please sign in to comment.