README.md

With this plugin, you can edit and save the files which encodings are not supported by Sublime Text currently, especially for those used by CJK users, such as GB2312, GBK, BIG5, EUC-KR, EUC-JP, etc. ConvertToUTF8 supports both Sublime Text 2 and 3.

If you want to support this plugin, you can donate via PayPal or Alipay. Thanks! :)

OR

Note

** If the plugin can not work properly, you might need to install an extra plugin: Codecs26 for Sublime Text 2 or Codecs33 for Sublime Text 3.

Installation

Using Package Control to find, install and upgrade ConvertToUTF8 is the recommended method to install this plug-in.

Otherwise, you can download this repository as a zip file, unzip it, and rename the new folder to ConvertToUTF8, then move this folder to Packages folder of Sublime Text (You can find the Packages folder by clicking "Preferences > Browse Packages" menu entry in Sublime Text).

Your folder hierarchy should look like this:

Configuration

Please check ConvertToUTF8.sublime-settings file for details. You should save your personal settings in a file named "ConvertToUTF8.sublime-settings" under "User" folder. You can set project-specific settings (except encoding_list and max_cache_size) in the .sublime-project file which can be opened via "Project > Edit Project" menu.

lazy_reload: save file to a temporary location, and reload it in background when switching to other windows or tabs (default: false)

Usage

In most cases, this plug-in will take care of encoding issues automatically.

You can also use the "File > Set File Encoding to" menu entry to transform between different encodings. For example, you can open a UTF-8 file, and save it to GBK, and vice versa.

Note:

if convert_on_save is set to false, the file will NEVER be saved to the selected encoding

please do not edit the file before the encoding detection process is finished

please try either increasing the value of max_detect_lines or set the encoding manually if the detection result is not accurate

due to limitation of API, when lazy_reload is set to true, quit Sublime Text immediately after saving a file will cause the file to be saved as UTF-8, the correct content will be reload next time Sublime Text starts

Q & A

Q: It is not working after installation, how do I fix it?

A: Please try the following steps:

Restart Sublime Text

Make sure the plug-in folder is named "ConvertToUTF8" (skip this step if you install via "Package Control")