Cause of garbled characters: Mac OS X is based on Unix and uses UTF-8 encoding by default. By default, Unix and Linux do not support THE ANSI (GBK) format (ANSI is the default Simplified Chinese encoding format under the Windows system) and GB2312 format. The default encoding for Sublime Text is UTF-8, so garbled characters are inevitable.

The solution is to install plug-ins that support displaying Chinese

  1. Command+shift+p enter inp to select Install package to execute, then enter ConverToUTF8 to select the plugin to install, or install GBK Encoding Support.
  2. If only the above plug-in is installed, but the Windows encoding format of the open document will report the following error, to support the Windows platform default ANSI Chinese encoding, you need to install the Codecs33 plug-in.
The following error occurs when you open a file on the Windows platform. File: /Users/ XXX/XXX (Encoding: GB2312 Error: Codecs missing Please install Codecs33 plugin (https://github.com/seanliang/Codecs33/tree/osx).Copy the code