Home > Database > Mysql Tutorial > sublime text2 编译时中文乱码解决办法

sublime text2 编译时中文乱码解决办法

WBOY
Release: 2016-06-07 15:08:36
Original
1599 people have browsed it

sublime text2在编译中文时会有乱码,按照网上流传的方法试验了很久总有问题,偶然间发现如下解决办法,不知是否通用,请各位验证。 1、编写runJava.bat脚本并放置在jdk的bin目录下(网上大把资料) @ECHO OFFcd %~dp1ECHO Compiling %~nx1.......IF EXIST %

sublime text2在编译中文时会有乱码,按照网上流传的方法试验了很久总有问题,偶然间发现如下解决办法,不知是否通用,请各位验证。

1、编写runJava.bat脚本并放置在jdk的bin目录下(网上大把资料)

@ECHO OFF
cd %~dp1
ECHO Compiling %~nx1.......
IF EXIST %~n1.class (
DEL %~n1.class
)
javac -encoding utf8 %~nx1
IF EXIST %~n1.class (
ECHO -----------OUTPUT-----------
java %~n1
)
Copy after login
其中注意添加这一行

javac -encoding utf8 %~nx1

2、参考网上资料的时候,在修改Javac.sublime.build这个文件时,不要添加encoding 936这个代码。

之后ctrl+B编译执行通过

sublime text2 编译时中文乱码解决办法





source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template