Summary
Detects the encoding of a file if and only if it includes a preamble .
- Assembly
- GitVersion
.Core .dll - Namespace
- GitVersion
.Helpers - Containing Type
- EncodingHelper
Syntax
public static Encoding DetectEncoding(string filename)
Attributes
| Type | Description |
|---|---|
| Nullable |
Parameters
| Name | Type | Description |
|---|---|---|
| filename | string | The file name to check the encoding of. |
Return Value
| Type | Description |
|---|---|
| Encoding | The encoding of the file if it has a preamble otherwise null. |