Solve the problem of Chinese garbled characters in Sublime Text3
The following tutorial column of sublime will introduce to you how to solve the problem of Chinese garbled characters in Sublime Text3. I hope it will be helpful to friends in need!
Causes of garbled characters:
Mac OS X is developed based on Unix system and uses UTF-8 encoding by default. Unix and Linux do not support the ANSI (GBK) format (ANSI is the default Chinese simplified encoding format under Windows systems) and GB2312 format by default. At the same time, the default encoding format of Sublime Text is UTF-8, so garbled characters are inevitable.
The solution is to install a plug-in that supports displaying Chinese
1.Command shift p and enter inp to select install package for execution, then enter ConverToUTF8 to select this plug-in for installation, or install GBK The Encoding Support plugin is also available.
2. If only the above plug-in is installed, but the document encoded in the Windows system is opened, the following error will be reported. To support the default ANSI Chinese encoding on the Windows platform, you need to install the Codecs33 plug-in.
When opening a file on Windows platform, the following error will be reported.
File: /Users/xxx/xxx(文件的路径) Encoding: GB2312 Error: Codecs missing Please install Codecs33 plugin (https://github.com/seanliang/Codecs33/tree/osx).
Sublime Text 3 Introduction:
Sublime Text is a code editor. Also an advanced text editor for HTML and prose. Sublime Text 3 has a beautiful user interface and extraordinary features such as: mini map, multiple selections, Python plugins, code snippets and more. Fully customizable keybindings, menus and toolbars and more. Beautiful user interface and extraordinary functionality, Sublime Text's key features include: spell check, bookmarks, full Python API, Goto functionality, instant project switching, multi-selection , multi-window and so on.
The above is the detailed content of Solve the problem of Chinese garbled characters in Sublime Text3. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Methods to improve programming efficiency using SublimeText include: 1) Proficient in using shortcut keys, such as Ctrl Shift D to copy lines; 2) Use multi-line editing functions, such as Ctrl mouse click to select multiple positions; 3) Install plug-ins, such as Emmet to generate HTML/CSS code; 4) Custom configuration files, such as setting font size and color theme. Mastering these techniques can greatly improve your coding speed and work efficiency.

The methods to customize SublimeText include: 1. Create and modify theme files, such as MyTheme.sublime-theme, and adjust the editor's appearance; 2. Customize key bindings, set shortcut keys through the Default (Windows).sublime-keymap file; 3. Install PackageControl and manage plug-ins through it, such as Emmet and SublimeLinter, and expand editor functions.

SublimeText's project management function can efficiently organize and navigate the code base through the following steps: 1. Create a project file and save the .sublime-project file using SaveProjectAs in the Project menu.... 2. Configure project files, specify the included folders and settings, such as excluding specific files or setting up the build system. 3. Open the project file and quickly load the project environment through OpenProject in the Project menu. 4. Optimize project files to avoid including too many folders, and use the exclusion mode to improve navigation speed. Through these steps, you can use SublimeText's project management capabilities to improve development efficiency and code quality.

Search and replace using regular expressions in SublimeText can be achieved through the following steps: 1. Turn on the search and replace function, using the shortcut keys Ctrl H (Windows/Linux) or Cmd Opt F (Mac). 2. Check the "regular expression" option and enter the regular expression mode to search and replace. 3. Use the capture group to extract matching content, for example, use https?://(1) to extract the domain name in the URL. 4. Test and debug regular expressions to ensure that the required content is correctly matched. 5. Optimize regular expressions to avoid over-match and use non-greedy matching to improve performance. /↩

SublimeText and VSCode have their own advantages in plug-in ecology and scalability. SublimeText manages plug-ins through PackageControl, which have a small number of plug-ins but high quality, and mainly uses Python script extensions. VSCode has a huge Marketplace, with a large number of plug-ins and frequent updates. It uses TypeScript and JavaScript to expand, and its API is more comprehensive.

Using the CommandPalette of SublimeText can improve productivity. 1) Open CommandPalette (Ctrl Shift P/Windows/Linux, Cmd Shift P/Mac). 2) Enter the command keyword, such as "InstallPackage" or "DarkTheme". 3) Select and execute commands, such as installing plug-ins or switching themes. Through these steps, CommandPalette can help you perform various tasks quickly and improve the editing experience.

There are two ways to generate HTML code in Sublime Text: Using the Emmet plugin, you can generate HTML elements by entering an abbreviation and pressing the Tab key, or use a predefined HTML file template that provides basic HTML structure and other features such as code snippets, autocomplete functionality, and Emmet Snippets.

SublimeText's BuildSystems can automatically compile and run code through configuration files. 1) Create a JSON configuration file and define the compilation and running commands. 2) Use shortcut keys to trigger BuildSystems to execute the command. 3) Optimize configuration to improve performance, such as using cache and parallel compilation. This allows developers to focus on writing code and improve development efficiency.
