---
scribo/ChangeLog | 4 ++++
scribo/scribo/text/recognition.hh | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index a3e6e7e..1bb8769 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,9 @@
2011-12-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * scribo/text/recognition.hh: Restore previous locale.
+
+2011-12-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Ensure current locale is C while calling Tesseract.
* demo/viewer/main.cc: Move call to setLocale...
diff --git a/scribo/scribo/text/recognition.hh b/scribo/scribo/text/recognition.hh
index 22d31f6..d754e66 100644
--- a/scribo/scribo/text/recognition.hh
+++ b/scribo/scribo/text/recognition.hh
@@ -193,6 +193,9 @@ namespace scribo
delete [] s;
}
+ // Restore default locale.
+ setlocale(LC_ALL, "");
+
trace::exiting("scribo::text::recognition");
}
@@ -268,6 +271,9 @@ namespace scribo
if (!output_file.empty())
file.close();
+ // Restore default locale.
+ setlocale(LC_ALL, "");
+
trace::exiting("scribo::text::recognition");
}
--
1.7.2.5
Show replies by date