diff --git a/src/training/unicharset_extractor.cpp b/src/training/unicharset_extractor.cpp index 1fbb58f0..d865935c 100644 --- a/src/training/unicharset_extractor.cpp +++ b/src/training/unicharset_extractor.cpp @@ -66,18 +66,18 @@ static int Main(int argc, char **argv) { // Load input files for (int arg = 1; arg < argc; ++arg) { std::filesystem::path filePath = argv[arg]; - std::string file_data = tesseract::ReadFile(filePath.u8string()); + std::string file_data = tesseract::ReadFile(argv[arg]); if (file_data.empty()) { continue; } std::vector texts; if (filePath.extension() == ".box") { - tprintf("Extracting unicharset from box file %s\n", filePath.u8string()); + tprintf("Extracting unicharset from box file %s\n", argv[arg]); bool res = ReadMemBoxes(-1, /*skip_blanks*/ true, &file_data[0], /*continue_on_failure*/ false, /*boxes*/ nullptr, &texts, /*box_texts*/ nullptr, /*pages*/ nullptr); if (!res) { - tprintf("Can not read box data from '%s'\n", filePath.u8string()); + tprintf("Can not read box data from '%s'\n", argv[arg]); return EXIT_FAILURE; } } else {