进入服务器目录 [root@VM_139_218_centos /]# cd ~ [root@VM_139_218_centos ~]# vim .vimrc 在 .vimrc 文件中写入以下代码: set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 set termencoding=utf-8 set encoding=utf-8 然后打开php文件,乱码消失,可以正常使用了.…
Java 读取csv文件后,再保存到磁盘上,然后直接用Excel打开,你会发现里面都是乱码. 贴上代码: public class Test { public static void main(String[] args) { try { File file = new File("c://csv//aa.csv"); FileOutputStream out = new FileOutputStream(file); out.write(IOUtils.toByteArray(T…
最近因为工作需要要打开一个300+MB的文件,试过了N个编辑器不是打不开就是软件直接挂掉或是占用内存太大,已经严重影响了我的工作 还好在网络上找到老外写的一个免费软件,官网上说是可以打开4G+的文件(没有测试过这么大的),官网介绍: LogViewer Pro is a viewer for text log files. Features include: Fast scrolling, eats low memory Supports any file size (4 Gb and larg…