mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-14 00:31:47 +08:00
Use "C" locale for ALTO output
This fixes wrong output of integers with locale de_DE.UTF-8: - <Page WIDTH="2.481" HEIGHT="3.508" PHYSICAL_IMG_NR="0" ID="page_0"> + <Page WIDTH="2481" HEIGHT="3508" PHYSICAL_IMG_NR="0" ID="page_0"> Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
83af58c2aa
commit
efc2b7601a
@ -149,6 +149,8 @@ char* TessBaseAPI::GetAltoText(ETEXT_DESC* monitor, int page_number) {
|
||||
#endif
|
||||
|
||||
std::stringstream alto_str;
|
||||
// Use "C" locale (needed for int values larger than 999).
|
||||
alto_str.imbue(std::locale::classic());
|
||||
alto_str
|
||||
<< "\t\t<Page WIDTH=\"" << rect_width_ << "\" HEIGHT=\""
|
||||
<< rect_height_
|
||||
|
Loading…
Reference in New Issue
Block a user