Learn your spare time and summarize the issues you encounter with using SUBLIMETEXT3 under Windows and Ubuntu
I. About SUBLIMETEXT3 the solution to run Chinese is not compiled under the DOS command line of Windows:
Because the DOS command line defaults to GBK encoding, it needs to be compiled as follows
Javac-encoding UTF-8 Xxx.java
This will allow you to run the class file to display Chinese correctly.
Two. About SUBLIMETEXT3 cannot play Chinese in Ubuntu solution
First need to install a Sogou input method on Ubuntu, and Sogou input method based on the Fcitx Input method framework, how to install the input method can refer to the following URL (I just follow this installation, hey)
Http://www.cnblogs.com/youxia/p/linux009.html
Now with the input method, you can follow the following method (the following method is also I searched the internet for a long time to get, and has been tested successfully)
1. Download the files we need to enter in the terminal:
clone https://github.com/lyfeyaj/sublime-text-imfix.git
2. Will be subl
moved to /usr/bin/
and will be sublime-imfix.so
moved to /opt/sublime_text/
(Sublime's installation directory)
Terminal input:
cd ~/sublime-text-imfixsudo cp ./lib/libsublime-imfix.so /opt/sublime_text/sudo cp ./src/subl /usr/bin/
3. Use the command to try to subl
start the sublime, if the successful start, you should be able to input Chinese.
Terminal input:
LD_PRELOAD=./libsublime-imfix.so subl
4. But this can only be started with the command line above to enter Chinese, we need a simpler way, I choose to create a new shell script, very simple, just a word.
Sublime New file Input:
#!/bin/bashLD_PRELOAD=/opt/sublime_text/libsublime-imfix.so subl
Then save the z file as sublime
(note: no suffix) and place it in the /home
folder.
5. So far, all the work has been done. To start, direct terminal input: bash ~/sublime
, you can start sublime, and can input Chinese.
6. If you do not need to enter Chinese, just open it in the previous way. The purpose of the script file is to easily open the sublime that can input Chinese.
(This way seems to only open through the terminal so ~)
Enable SUBLIMETEXT3 to play Chinese under Ubuntu and to display Chinese under DOS command line in Windows normally