C# Класс AutoIt.Common.TextEncodingDetect

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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