Enable SUBLIMETEXT3 to play Chinese under Ubuntu and display Chinese normally under DOS command line in Windows

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.