mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
dd757e9034
Before this change, there was a chance that a text editor or compiler would use the wrong character encoding. For text editors, this commit adds “charset = utf-8” to .editorconfig. That will cause editors that support EditorConfig files [1] to automatically use UTF-8 when reading and writing files. For compilers, this commit adds compiler options that guarantee that compilers will decode source code files using UTF-8. The compiler options are known to work on MSVC, GCC and Clang. If we ever want to support additional compilers, then we might have to edit the if statement that this commit adds. This commit does not eliminate the chance that a wrong character encoding will be used. Someone could always use a text editor that doesn’t support EditorConfig files or a compiler that doesn’t support the compiler options that we use. This commit does, however, make an encoding mismatch much less likely. [1]: <https://editorconfig.org/#pre-installed>
23 lines
634 B
INI
23 lines
634 B
INI
root = true
|
|
|
|
[*]
|
|
indent_style = space
|
|
indent_size = 2
|
|
tab_width = 8
|
|
end_of_line = lf
|
|
charset = utf-8
|
|
spelling_language = en-US
|
|
|
|
[*.md]
|
|
# I would use 2 spaces for indentation in Markdown files in order to be
|
|
# consistent wit the rest of the project, but the GitHub Flavored Markdown Spec
|
|
# requires that you use at least 4 spaces in certain situations:
|
|
# <https://github.github.com/gfm/#indented-code-blocks>
|
|
indent_size = 4
|
|
|
|
# This end_of_line override exists in order to be consistent with
|
|
# .gitattributes. If you add another override here, then you please also add it
|
|
# to .gitattributes.
|
|
[{*.vcproj,*.vcxproj}]
|
|
end_of_line = crlf
|