C# 클래스 AutoIt.Common.TextEncodingDetect

파일 보기 프로젝트 열기: AutoIt/text-encoding-detect 1 사용 예제들

공개 메소드들

메소드 설명
CheckBom ( byte buffer, int size ) : Encoding

Checks for a BOM sequence in a byte buffer.

DetectEncoding ( byte buffer, int size ) : Encoding

Automatically detects the Encoding type of a given byte buffer.

GetBomLengthFromEncodingMode ( Encoding encoding ) : int

Gets the BOM length for a given Encoding mode.

비공개 메소드들

메소드 설명
CheckUtf16Ascii ( byte buffer, int size ) : Encoding

Checks if a buffer contains text that looks like utf16. This is done based on the use of nulls which in ASCII/script like text can be useful to identify.

CheckUtf16NewlineChars ( byte buffer, int size ) : Encoding

Checks if a buffer contains text that looks like utf16 by scanning for newline chars that would be present even in non-english text.

CheckUtf8 ( byte buffer, int size ) : Encoding

Checks if a buffer contains valid utf8.

DoesContainNulls ( byte buffer, int size ) : bool

Checks if a buffer contains any nulls. Used to check for binary vs text data.

메소드 상세

CheckBom() 공개 메소드

Checks for a BOM sequence in a byte buffer.
public CheckBom ( byte buffer, int size ) : Encoding
buffer byte
size int
리턴 Encoding

DetectEncoding() 공개 메소드

Automatically detects the Encoding type of a given byte buffer.
public DetectEncoding ( byte buffer, int size ) : Encoding
buffer byte The byte buffer.
size int The size of the byte buffer.
리턴 Encoding

GetBomLengthFromEncodingMode() 공개 정적인 메소드

Gets the BOM length for a given Encoding mode.
public static GetBomLengthFromEncodingMode ( Encoding encoding ) : int
encoding Encoding
리턴 int