vscode安装arduino插件后输出乱码问题
2023-8-31 19:03:02 点击:
到下面的目录下找到utils.js文件,转到209行
C:\Users\Administrator\.vscode\extensions\vsciot-vscode.vscode-arduino-0.6.0-win32-x64\out\src\common
function spawn(command, args = [], options = {}, output) { return new Promise((resolve, reject) => { options.cwd = options.cwd || path.resolve(path.join(__dirname, "..")); const child = child_process.spawn(command, args, options); let codepage = "65001"; /***********************注释这里的编码设置,解决arduino编译输出乱码问题 if (os.platform() === "win32") { codepage = getArduinoL4jCodepage(command.replace(/.exe$/i, ".l4j.ini"));
if (!codepage) { try { const chcp = child_process.execSync("chcp.com"); codepage = chcp.toString().split(":").pop().trim(); } catch (error) { outputChannel_1.arduinoChannel.warning(`Defaulting to code page 850 because chcp.com failed.\ \rEnsure your path includes %SystemRoot%\\system32\r${error.message}`); codepage = "850"; } } }*************************/
- 上一篇:没有啦
- 下一篇:Unity3D跨屏幕、全屏显示方法 2023/8/24