Skip to content

Commit

Permalink
Start with a UTF-8-BOM file instead of creating it from the the ASCII…
Browse files Browse the repository at this point in the history
… encoded batch file.
  • Loading branch information
daschuer committed Apr 28, 2023
1 parent c2934d4 commit 3acac51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ repos:
rev: v4.3.0
hooks:
- id: fix-byte-order-marker
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters)$
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters|UTF-8-BOM.txt)$
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
exclude: ^\.clang-format$
- id: end-of-file-fixer
exclude: ^.*UTF-8-BOM.txt$
- id: mixed-line-ending
- id: trailing-whitespace
exclude: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|mm|proto|vert)$
Expand Down
1 change: 1 addition & 0 deletions tools/UTF-8-BOM.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

11 changes: 5 additions & 6 deletions tools/windows_buildenv.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
REM this í is just to force some editors to recognize this file as ANSI, not UTF8.

CALL :REALPATH "%~dp0\.."
SET MIXXX_ROOT=%RETVAL%
Expand Down Expand Up @@ -174,13 +173,13 @@ REM Generate CMakeSettings.json which is read by MS Visual Studio to determine t

CALL :SETANSICONSOLE
SET OLDCODEPAGE=%RETVAL%
REM set byte order mark (BOM) for the file .
REM WARNING: Ensure that the script is saved as ANSI, or these characters will not
REM contain the correct values. Correct values are EF BB BF (ï » ¿) .
REM The last character is an actual character for the file, the start "{"
>"%CMakeSettings%" echo {
REM Start with a UTF-8-BOM
REM Correct values are EF BB BF (ï » ¿)
REM Make sure the BOM is not removed from UTF-8-BOM.txt
copy "%MIXXX_ROOT%\tools\UTF-8-BOM.txt" "%CMakeSettings%"
CALL :SETUTF8CONSOLE

>>"%CMakeSettings%" echo {
>>"%CMakeSettings%" echo "configurations": [
SET configElementTermination=,
CALL :Configuration2CMakeSettings_JSON off Debug
Expand Down

0 comments on commit 3acac51

Please sign in to comment.