vscode安装arduino插件后输出乱码问题
2023/7/27 点击:
到下面的目录下找到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"; } } }*************************/
- 上一篇:元宇宙元宇宙三大技术阶段数字孪生数字伴生数字原生 2023/8/10
- 下一篇:使用两个IMU测量手臂或者腿关节角度 2023/4/24