How to output Chinese in Sublime Text? Install the CJK unified font (Windows) or Adobe Song Type Standard font (Mac). Set UTF-8 encoding (Windows: View > Encoding, Mac: Settings > "encoding": "utf-8"). Enter Chinese using Unicode (Windows: Alt keypad, Mac: Option key).
How to output Chinese in Sublime Text
To use Sublime Text to output Chinese, please follow the steps below:
1. Install the font
- For Windows users, download and install the CJK unified font (for example, Arial Unicode MS or Microsoft YaHei).
- For Mac users, CJK fonts are usually pre-installed. If you don't have these fonts, you can download the Adobe Song Type Standard font family from the Adobe website.
2. Set encoding
- Windows:Open "View">"Encoding">"UTF- 8".
- Mac:Open "Sublime Text" > "Preferences" > "Settings", and then add the following line in the "Additional User Preferences" area:
"encoding": "utf-8"
Copy after login
3. Enter Chinese
- Windows:Hold down the Alt key and use the keypad to enter Unicode (for example, Alt 9312 to enter "中") .
- Mac:Depends on the keyboard layout you are using (for example, when using the US keyboard layout, press Option v to enter "medium").
Additional Tips:
- If you have trouble typing, make sure you have AutoComplete enabled (View >"AutoComplete").
- To input Traditional Chinese, please install the Fira Code CJK font in Sublime Text.
- Make sure the file you use is ASCII encoded to avoid garbled characters.
The above is the detailed content of How to output Chinese in sublime. For more information, please follow other related articles on the PHP Chinese website!