Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
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.
|
public CheckBom ( byte buffer, int size ) : Encoding | ||
buffer | byte | |
size | int | |
return | Encoding |
public DetectEncoding ( byte buffer, int size ) : Encoding | ||
buffer | byte | The byte buffer. |
size | int | The size of the byte buffer. |
return | Encoding |
public static GetBomLengthFromEncodingMode ( Encoding encoding ) : int | ||
encoding | Encoding | |
return | int |