- Code: Select all
API: Added view.encoding() and view.set_encoding()
API: Added view.line_endings() and view.set_line_endings()
What's the list of encodings accepted by set_encoding() ?
I try to get an UTF-8 with BOM but didn't find how to spell it...
And is there any plan to have default encoding by syntax ?
Actually, I use different encoding for different language:
-Delphi and PL/SQL files -> cp1252
-Python -> utf-8 BOM
-Almost anything else -> utf-8
Actually new files are 'Undefined' and get an encoding when saved.
What I like is that the encoding used when the file is saved come from a settings in the Base File.sublime-settings (or the syntax specific one).
A warning message before saving if the encoding didn't take care of some of the char in the buffer would be nice.
I'm pretty sure it's easy to make a plugin that trap the on_pre_save event to do that work, but I just wonder if something is planned before doing it.