I can't believe to find myself doing this ...
As of version 8 CONVERTCP supports the codepage detection of the incoming stream. It's still rather guessing. So, you should not rely on it.
Jean-François made some tests with IMultiLanguage2::DetectInputCodepage and the results have been exciting enough to investigate how to improve it.
viewtopic.php?f=3&t=10088
If you want to try out, just use a question mark as first argument.
Code: Select all
convertcp ? 65001 /i "a.txt" /o "b.txt"
CONVERTCP will try to determine the encoding of a.txt for the conversion.
You can also hint an encoding. Use the question mark followed by a preferred codepage ID. If reasonable, CONVERTCP will use it rather than the guessed encoding. However, if the guessed encoding is more likely than the hint, CONVERTCP won't use your preference.
Code: Select all
convertcp ?437 65001 /i "a.txt" /o "b.txt"
In both cases CONVERTCP will fail (no conversion performed) if it is unable to guess an encoding.
Virustotal scans of version 8.0:
x86:
https://www.virustotal.com/gui/file/cac ... 96d1c78c7a
x64:
https://www.virustotal.com/gui/file/8a5 ... f7ee9a5385
Steffen