How do I convert a doc file with UTF-8 entity characters and automatically convert the the entities to its proper hexadecimal NCR sequence (e.x. ꯍ
)
Below is a sample text from a doc file:
Isto é um teste. Eu não me importo com o que você pensa.
Você acha que me conhece muito bem.
After converting this to txt file the output should be:
Isto é um teste. Eu não me importo com o que você pensa.
Você acha que me conhece muito bem.
I did.
Document document = new Document();
string docPath = @"C:\Users\Tamal\Desktop";
document.LoadFromFile(Path.Combine(docPath,"op.docx"));
document.SaveToFile(Path.Combine(docPath,"op.txt"), FileFormat.Txt);
string readText = File.ReadAllText(Path.Combine(docPath,"op.txt"));
System.Diagnostics.Process.Start(Path.Combine(docPath,"op.txt"));
Console.ReadLine();
But this outputs the text file as (exactly the way the doc file is):
Isto é um teste. Eu não me importo com o que você pensa.
Você acha que me conhece muito bem.
How and where do I add the entity hexadecimal conversion?
NOTE: I am using Spire.Doc for converting doc to txt.