zoukankan      html  css  js  c++  java
  • 解决vscode控制台乱码的问题

    https://blog.csdn.net/piglite/article/details/85837325?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.control&dist_request_id=7f8b147a-d058-44d4-a6fa-7b0e627063c4&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.control

    VSCode终端其实调用的是cmd.exe,所以当这里出现中文乱码的时候要解决的是cmd的编码设置问题。

    可以通过chcp命令查看cmd的编码设置,GBK2312的代码页编号是936,然后改成utf-8的编码即可,utf-8对应的代码页编号是65001,所以执行chcp 65001就可以把cmd的编码设置成uft-8了,这样就解决了乱码问题

    1.查看原有编码

    2.执行chcp 65001命令

    3.再次运行代码查看输出

    这篇文章,是又一个故事的结束...
    lazy's story is continuing.
  • 相关阅读:
    重要的环境变量
    常用的转义字符
    常用系统工作命令
    栈 队列 和 双向队列
    时间
    默认值字典
    Counter
    random
    22 内置常用模块01
    super
  • 原文地址:https://www.cnblogs.com/Hello-world-hello-lazy/p/14423170.html
Copyright © 2011-2022 走看看