proxytoworld
V2EX  ›  问与答

怎么设置 Windows terminal 默认编码为 65001(utf-8)而不是 936(中文)

  •  
  •   proxytoworld · Oct 14, 2021 · 4115 views
    This topic created in 1868 days ago, the information mentioned may be changed or developed.

    打开 windows terminal 出现的终端默认编码是 936 (中文),怎么可以设置为默认打开是编码 65001 ( utf-8 ),已经在注册表中让 cmd 和 powershell 默认编码是 utf-8 了,但还是没办法让 wt 打开的终端为 utf-8

    5 replies  •  2022-01-15 21:39:58 +08:00
    kebamt
    kebamt
    Oct 14, 2021 via iPhone
    1
    kebamt
    kebamt
    Oct 14, 2021 via iPhone
    2
    我前几天也因为编码问题不能把 Terminal 输出的内容写进文件,勾选这个选项后解决了。
    kebamt
    kebamt
    Oct 14, 2021 via iPhone
    3
    也可以看一下这个文章,不过我没弄明白。
    Changing PowerShell's default output encoding to UTF-8: https://newbedev.com/changing-powershell-s-default-output-encoding-to-utf-8
    mengzonefire223
    mengzonefire223
    Dec 3, 2021❤️1
    4
    以 powershell 为例:
    windowTerminal 对应设置项中, 修改启动命令为:
    powershell.exe -noexit -command [System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8
    即可
    chackchackGO
    chackchackGO
    Jan 15, 2022
    5
    在知乎上找到了答案
    control panel- region-administrative-change system locale, 勾选 bate-use utf-8 for worldwide language support
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3021 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 10:16 · PVG 18:16 · LAX 02:16 · JFK 05:16
    ♥ Do have faith in what you're doing.