zoukankan      html  css  js  c++  java
  • sublime text3 nodejs控制台输出结果中文乱码

    在sublime text3安装完nodejs的插件后,运行console.log("你好"),发现控制台出现中文乱码,解决办法:Preferences-> Browser Packages 打开文件夹后找到  Nodejs -> Nodejs.sublime-build

    改其中的encoding为utf-8即可, 默认为cp1252 

     1 {
     2   "cmd": ["node", "$file"],
     3   "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
     4   "selector": "source.js",
     5   "shell": true,
     6   "encoding": "utf-8",
     7   "windows":
     8     {
     9         "shell_cmd": "taskkill /F /IM node.exe & node $file"
    10     },
    11     "linux":
    12     {
    13         "shell_cmd": "killall node; /usr/bin/env node $file"
    14     },
    15     "osx":
    16     {
    17         "shell_cmd": "killall node; /usr/bin/env node $file"
    18     }
    19 }
  • 相关阅读:
    2. 两数相加
    1. 两数之和
    x-pack elasticsearch
    简单的文档
    PHP imagepng函数 问题
    Nginx 配置
    nginx内置变量
    TCP通信
    mysql 的一些操作
    ubuntu 软件包降级
  • 原文地址:https://www.cnblogs.com/clicklin/p/9291653.html
Copyright © 2011-2022 走看看