I want to read an utf-8 encoded file into a string and use regex to match the content. I tried two methods:
var file = DOpus.FSUtil.OpenFile("file.txt"); blob = file.Read();
However, I don't know how to convert blob to string.
var fso = new ActiveXObject("Scripting.FileSystemObject"); var txtFile = fso.OpenTextFile("file.txt", 1, false, -0); var text = txtFile.ReadAll();
In this way, the text encoding was handled incorrectly.