Commit 0d997ad8 刘韬

utf-8

1 个父辈 2c941400
...@@ -12,6 +12,7 @@ using System.Text; ...@@ -12,6 +12,7 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using static ScanCodeServer.EyemDecode2;
using static System.Net.Mime.MediaTypeNames; using static System.Net.Mime.MediaTypeNames;
namespace ScanCodeServer namespace ScanCodeServer
...@@ -94,7 +95,7 @@ namespace ScanCodeServer ...@@ -94,7 +95,7 @@ namespace ScanCodeServer
List<CodeInfo> codeList = new List<CodeInfo>(); List<CodeInfo> codeList = new List<CodeInfo>();
try try
{ {
//HOperatorSet.SetSystem("filename_encoding", "utf8"); HOperatorSet.SetSystem("filename_encoding", "utf8");
HTuple hv_Area = null; HTuple hv_Area = null;
HTuple hv_Row1 = null; HTuple hv_Row1 = null;
HTuple hv_Column = null; HTuple hv_Column = null;
...@@ -106,7 +107,7 @@ namespace ScanCodeServer ...@@ -106,7 +107,7 @@ namespace ScanCodeServer
HTuple hv_DataCodeHandle = null; HTuple hv_DataCodeHandle = null;
HOperatorSet.GenEmptyObj(out ho_SymbolXLDs); HOperatorSet.GenEmptyObj(out ho_SymbolXLDs);
HOperatorSet.CreateDataCode2dModel(symbolType, "default_parameters", "maximum_recognition", out hv_DataCodeHandle); HOperatorSet.CreateDataCode2dModel(symbolType, "default_parameters", "maximum_recognition", out hv_DataCodeHandle);
HOperatorSet.SetDataCode2dParam(hv_DataCodeHandle, "string_encoding", "utf8");
//string hv_model_path = GetCodeParamFilePath(symbolType); //string hv_model_path = GetCodeParamFilePath(symbolType);
if (!hv_model_path.Equals("") && File.Exists(hv_model_path)) if (!hv_model_path.Equals("") && File.Exists(hv_model_path))
{ {
...@@ -147,7 +148,7 @@ namespace ScanCodeServer ...@@ -147,7 +148,7 @@ namespace ScanCodeServer
int y = (int)Math.Round(hv_Row1.DArr[i]); int y = (int)Math.Round(hv_Row1.DArr[i]);
string str = hv_DecodedDataStrings.SArr[i]; string str = hv_DecodedDataStrings.SArr[i];
str = SpecialCharReplace(str); //str = SpecialCharReplace(str);
//var isv = IsStringValid(str); //var isv = IsStringValid(str);
CodeInfo code = new CodeInfo(str, x, y); CodeInfo code = new CodeInfo(str, x, y);
codeList.Add(code); codeList.Add(code);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!