Answer the question
In order to leave comments, you need to log in
How to set encoding in sublime text depending on file extension?
How to set encoding in sublime text depending on file extension?
I understand that there is an option to customize depending on the syntax. But I have a file for which there is no syntax in the distribution kit.
I understand that there is an option to specify
"fallback_encoding": "Western (Windows 1252)" and "default_encoding": "UTF-8" settings.
But I need to use three different encodings: cp1251, cp866 and utf8 depending on file types.
Answer the question
In order to leave comments, you need to log in
Alternatively, use EditorConfig .
Example .editorconfig file
[*.{js,py}]
charset = utf-8
[*.php]
charset = cp866
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question