使用ai解决编码不一的问题
This commit is contained in:
17
.editorconfig
Normal file
17
.editorconfig
Normal file
@@ -0,0 +1,17 @@
|
||||
# EditorConfig helps maintain consistent coding styles
|
||||
# https://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8-bom
|
||||
end_of_line = crlf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{cpp,h,hpp}]
|
||||
indent_style = tab
|
||||
|
||||
[*.{json,xml,yml,yaml,md}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
14
.vscode/settings.json
vendored
Normal file
14
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files.encoding": "utf8",
|
||||
"files.autoGuessEncoding": false,
|
||||
"editorconfig.enable": true,
|
||||
"[cpp]": {
|
||||
"files.encoding": "utf8-bom"
|
||||
},
|
||||
"[h]": {
|
||||
"files.encoding": "utf8-bom"
|
||||
},
|
||||
"[c]": {
|
||||
"files.encoding": "utf8-bom"
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,10 @@ add_definitions(-D_UNICODE)
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
|
||||
# Force UTF-8 encoding for source files to avoid encoding issues
|
||||
# when editing in VSCode and building in VS2022
|
||||
add_compile_options(/utf-8)
|
||||
|
||||
# Set runtime library: MTD for Debug, MT for Release
|
||||
# This ensures static linking to the C/C++ runtime
|
||||
set_target_properties(EzUI PROPERTIES
|
||||
|
||||
Reference in New Issue
Block a user