ScriptUtilTryDetectTextFileEncoding Method |  |
Detects and returns the encoding of a text file.
A return value indicates the detection was likely successful.
Namespace: Compiled.EDD.ScriptingAssembly: Compiled.EDD.Scripting (in Compiled.EDD.Scripting.dll) Version: 9.0.0.0-142fa9725
Syntaxpublic static bool TryDetectTextFileEncoding(
string filePath,
out Encoding fileEncoding
)
Parameters
- filePath String
- The path of the text file to detect encoding.
- fileEncoding Encoding
- When this method returns, contains the detected encoding. If the detection was not successful,
the fileEncoding parameter will be null.
Return Value
Booleantrue if the encoding was likely detected successfully; otherwise, false.
See Also