Skip to content

Commit

Permalink
Tesseract5: 修复读取输出乱码
Browse files Browse the repository at this point in the history
  • Loading branch information
imba-tjd authored Jan 28, 2022
1 parent e7339af commit 71b7fd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OCRLibrary/Tesseract5OCR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public override Task<string> OCRProcessAsync(Bitmap img)
CreateNoWindow = true,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true
RedirectStandardError = true,
StandardOutputEncoding = Encoding.UTF8
});
var imgdata = ImageProcFunc.Image2Bytes(img);
p.StandardInput.BaseStream.Write(imgdata, 0, imgdata.Length);
Expand Down

0 comments on commit 71b7fd5

Please sign in to comment.