TypeName | SA1412StoreFilesAsUtf8 |
CheckId | SA1412 |
Category | Maintainability Rules |
📝 This rule is new for StyleCop Analyzers, and was not present in StyleCop Classic.
The encoding of the file is not UTF-8 with byte order mark.
Storing files in this encoding ensures that the files are always treated the same way by the compiler, even when compiled on systems with varying default system encodings. In addition, this encoding is the most widely supported encoding for features like visual diffs on GitHub and other tooling. This encoding is also the default encoding used when creating new C# source files within Visual Studio.
To fix a violation of this rule, convert the files encoding to UTF-8 with byte order mark