Skip to content

Commit cecdf22

Browse files
Sp3EdeRHannia Valerahanniavaleramcodilla
authored
Fixed VS scan kits character coding (#4624)
* Fixed VS scan kits character coding The Windows batchs script is built from UTF-8 paths, but the launched CMD instance is using a locale-specific codepage. Forcing it to use UTF-8. * changelog entry --------- Co-authored-by: Hannia Valera <[email protected]> Co-authored-by: Hannia Valera <[email protected]> Co-authored-by: MacGyver Codilla <[email protected]>
1 parent 8d371d2 commit cecdf22

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Bug Fixes:
7676
- Add support for Visual Studio 2026 generator. [#4637](https://github.com/microsoft/vscode-cmake-tools/issues/4637)
7777
- Fix `$comment` not being accepted inside a cacheVariable object in CMake presets. [#4600](https://github.com/microsoft/vscode-cmake-tools/issues/4600)
7878
- Fix kits from `cmake.additionalKits` not being shown when `cmake.showSystemKits` is `false`. [#4651](https://github.com/microsoft/vscode-cmake-tools/issues/4651)
79+
- Fix "Scan for Kits" failing to invoke `vcvarsall.bat` when Visual Studio is installed in a non-ASCII directory path, by forcing the generated batch script to use UTF-8 codepage. [#4623](https://github.com/microsoft/vscode-cmake-tools/issues/4623) [@Sp3EdeR](https://github.com/Sp3EdeR)
7980
- Fix how `jobs` is handled in build presets. Also update how `cmake.parallelJobs` is handled as a fallback when a build preset does not define `jobs`. [#4176](https://github.com/microsoft/vscode-cmake-tools/issues/4176)
8081
- Fix diagnostics to handle when there isn't a command in the error output. [PR #4765](https://github.com/microsoft/vscode-cmake-tools/pull/4765)
8182
- Fix bug in which running "CMake: Build" would always run "CMake: Clean Rebuild" when `cmake.buildTask` is enabled [#4421](https://github.com/microsoft/vscode-cmake-tools/issues/4421) [@RedSkittleFox](https://github.com/RedSkittleFox)

src/installs/visualStudio.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ async function collectDevBatVars(hostArch: string, devBat: string, args: string[
319319
const envFileName = batFileName + '.env';
320320
const bat = [
321321
`@echo off`,
322+
`chcp 65001`,
322323
`cd /d "%~dp0"`,
323324
`set "VS${majorVersion}0COMNTOOLS=${commonDir}"`,
324325
`set "INCLUDE="`,

0 commit comments

Comments
 (0)