mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-26 23:12:38 +02:00
Encoding fix for non english languages
This commit is contained in:
parent
31cb3a67cb
commit
cc5ed55988
@ -132,6 +132,8 @@ namespace Nikse.SubtitleEdit.Logic.Ocr.Tesseract
|
||||
Tesseract5.SetImage(bitmap);
|
||||
result = Tesseract5.GetHOCR();
|
||||
result = ParseHocr(result);
|
||||
byte[] bytes = Encoding.Default.GetBytes(result);
|
||||
result = Encoding.UTF8.GetString(bytes);
|
||||
Marshal.FreeHGlobal(Tesseract5.imageData); //free temp image global buffer (used to pass image data to external c++ dll)
|
||||
Tesseract5.imageData = IntPtr.Zero; //remove handle so we don't try to free it again
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user