1:首先保证源文件编码方式为UTF-8 2:读取代码,设置编码方式rs.setEncoding('utf8') var fs = require('fs'); var rs = fs.createReadStream('G:\\tmp\\tt.txt'); rs.setEncoding('utf8'); var data = ''; rs.on('data',function(trunk){ data += trunk; }); rs.on('end',function(){ console.l…
异常处理汇总-开发工具 http://www.cnblogs.com/dunitian/p/4522988.html 一张图解决 异常处理汇总:http://www.cnblogs.com/dunitian/p/4599258.html Git: 1.fatal: could not create work tree dir 'XXX': No such file or directory http://www.cnblogs.com/dunitian/p/5035595.html 2.Git…
Windows下Git Bash中VIM打开文件中文乱码,解决方法是: 步骤一 admin@DESKTOP-O99620V MINGW64 /d/项目GGE/Hard_for_GGE (master) $ cd /etc/ admin@DESKTOP-O99620V MINGW64 /etc $ vi vimrc 步骤二 在打开的vimrc文件开头添加以下代码: set nu set fencs=utf-,gbk,utf-,utf-,ucs-bom 保存并退出vimrc编辑文档. 步骤三 1.退…