C# Class FastColoredTextBoxNS.EncodingDetector

Show file Open project: samarjeet27/ynoteclassic

Public Methods

Method Description
DetectBOMBytes ( byte BOMBytes ) : Encoding
DetectTextFileEncoding ( FileStream InputFileStream, long HeuristicSampleSize ) : Encoding
DetectTextFileEncoding ( FileStream InputFileStream, long HeuristicSampleSize, bool &HasBOM ) : Encoding
DetectTextFileEncoding ( string InputFilename ) : Encoding
DetectUnicodeInByteSampleByHeuristics ( byte SampleBytes ) : Encoding

Private Methods

Method Description
DetectSuspiciousUTF8SequenceLength ( byte SampleBytes, long currentPos ) : int
IsCommonUSASCIIByte ( byte testByte ) : bool

Method Details

DetectBOMBytes() public static method

public static DetectBOMBytes ( byte BOMBytes ) : Encoding
BOMBytes byte
return System.Text.Encoding

DetectTextFileEncoding() public static method

public static DetectTextFileEncoding ( FileStream InputFileStream, long HeuristicSampleSize ) : Encoding
InputFileStream System.IO.FileStream
HeuristicSampleSize long
return System.Text.Encoding

DetectTextFileEncoding() public static method

public static DetectTextFileEncoding ( FileStream InputFileStream, long HeuristicSampleSize, bool &HasBOM ) : Encoding
InputFileStream System.IO.FileStream
HeuristicSampleSize long
HasBOM bool
return System.Text.Encoding

DetectTextFileEncoding() public static method

public static DetectTextFileEncoding ( string InputFilename ) : Encoding
InputFilename string
return System.Text.Encoding

DetectUnicodeInByteSampleByHeuristics() public static method

public static DetectUnicodeInByteSampleByHeuristics ( byte SampleBytes ) : Encoding
SampleBytes byte
return System.Text.Encoding