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: 7.6.1.3-5cb5c356
Syntax
C#
public static bool TryDetectTextFileEncoding(
	string filePath,
	out Encoding fileEncoding
)

Parameters

filePath
Type: SystemString
The path of the text file to detect encoding.
fileEncoding
Type: System.TextEncoding
When this method returns, contains the detected encoding. If the detection was not successful, the fileEncoding parameter will be null.

Return Value

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