Paul, your code works fine, many thanks! But... It works only with small text samples. With entire book, your code is very very slow... and it doesn't works: there are false positive, saying that the document contains Unicode characters whereas it is false. In order to check that, we can compare using WinMerge the text with and without Unicode encoding. Then... I found the solution!!! I just have to save as text with and without Unicode and reload it and compare the results: it is very fast. Thanks anyway for helping.
P.S.: Your code says that for example character É is a Unicode character, this is ambiguous, because it can finally be saved using ANSI encoding. Unicode is really required for example for exotic characters like narrow no-break space (NNBSP : Alt+8239 : U+202F).
|