|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
#include "OCRCharset.h"
|
|
|
|
|
#include "OCRConfig.h"
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#pragma warning(disable:6262)
|
|
|
|
|
|
|
|
|
|
std::map<int, std::wstring> uns::OCRCharset::en_charmap =
|
|
|
|
@ -6860,11 +6861,15 @@ std::wstring uns::OCRCharset::GetString(const std::vector<int>& indexs)
|
|
|
|
|
}
|
|
|
|
|
if ((charset_ptr == nullptr))
|
|
|
|
|
return L"";
|
|
|
|
|
int last_index = 0;
|
|
|
|
|
std::wstring result;
|
|
|
|
|
for (const auto& index : indexs)
|
|
|
|
|
{
|
|
|
|
|
if (charset_ptr->find(index) == charset_ptr->end())
|
|
|
|
|
continue;
|
|
|
|
|
if (last_index == index)
|
|
|
|
|
continue;
|
|
|
|
|
last_index = index;
|
|
|
|
|
if (index == 0) //Ignore 0 (Invalidate Value)
|
|
|
|
|
continue;
|
|
|
|
|
result += (*charset_ptr)[index];
|
|
|
|
|