Click or drag to resize

ScriptUtilTryDetectTextFileEncoding Method

Detects and returns the encoding of a text file. A return value indicates the detection was likely successful.

Namespace: Compiled.EDD.Scripting
Assembly: Compiled.EDD.Scripting (in Compiled.EDD.Scripting.dll) Version: 9.0.0.0-142fa9725
Syntax
C#
public 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

Boolean
true if the encoding was likely detected successfully; otherwise, false.
See Also