Commit 8983aa5c authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

demo/viewer/main.cc: Fix an issue with Tesseract 2.x and specific locales.

parent 9cc6925d
2011-09-13 Guillaume Lazzara <z@lrde.epita.fr>
* demo/viewer/main.cc: Fix an issue with Tesseract 2.x and
specific locales.
2011-09-15 Roland Levillain <roland@lrde.epita.fr>
Update SCRIBO tests w.r.t. the new version of lena.pgm.
......
......@@ -18,6 +18,10 @@
#include <QtGui>
#include <iostream>
# ifdef HAVE_TESSERACT_2
#include <clocale>
# endif // ! HAVE_TESSERACT_2
#undef MLN_WO_GLOBAL_VARS
#include "viewer.hh"
#include <mln/labeling/colorize.hh>
......@@ -45,5 +49,15 @@ int main(int argc, char** argv)
if (!viewer)
return -1;
# ifdef HAVE_TESSERACT_2
// Tesseract 2.x is known to have issues while reading training data
// depending on the current locales in use. Training data files use
// float data and the decimal separator can be either '.' or ','
// causing errors.
// Setting locale to "C" fix that issue.
setlocale(LC_ALL, "C");
# endif // ! HAVE_TESSERACT_2
return viewer->exec();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment