V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
johnsonshu
V2EX  ›  编程

vscode 编译(build)代码时出现的乱码

  •  
  •   johnsonshu · Aug 4, 2021 · 2349 views
    This topic created in 1730 days ago, the information mentioned may be changed or developed.

    一般的 Terminal 乱码我可以用 chcp 65001 去解决。
    但是 build task ( Terminal -> run build task )的这个,
    我根本没有机会去改变 encoding 啊,该怎么解决啊?

    cl_garbled.png

    Supplement 1  ·  Aug 4, 2021
    这个 bug 有关联,但是不是根本原因。
    Supplement 2  ·  Aug 4, 2021
    为 cl.exe 加个 /utf-8 参数,可以没有 Warning.
    但是,Warning 为什么乱码的问题,还是没有解决。
    Supplement 3  ·  Aug 4, 2021
    tasks.json 里

    把 type 从 cppbuild 改成 shell
    就能输出英文的 Warning 了。 也不知道 cppbuild type 是什么。
    3 replies    2021-08-04 21:51:43 +08:00
    darer
        1
    darer  
       Aug 4, 2021
    (写 c++用 vscode 就是折磨自己
    lwh0328
        2
    lwh0328  
       Aug 4, 2021 via iPhone   ❤️ 1
    为嘛不用 cmake 呢
    LifStge
        3
    LifStge  
       Aug 4, 2021   ❤️ 1
    +1 这里建议用 cmake 呢 同时 vcpkg 包管理 顺道使用 vcpkg.json versioning 减少命令行 方便不少呢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2642 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 11:27 · PVG 19:27 · LAX 04:27 · JFK 07:27
    ♥ Do have faith in what you're doing.