Which encoding is currently detected by ST2 before using the fallback_encoding ?
And is there a way to know the actual encoding used for a file in a view (view.settings().get(???)) ?
Like the ‘Show Unsaved Changes…’ command that only work for UTF8 files, I’ve lot of issues in plugin when interacting with files with unknown encoding.
Actually 95% of my files are UTF8 or window-1252 (fallback_encoding), so trying the first and in case of exception the second work pretty well.
For the others (UTF16,…), bad luck… Maybe using something like that (http://chardet.feedparser.org) is a solution, understanding that there is no definitive solution for this problem.
Is something planned to ST2 for encoding detection with an API to check a file without opening it in a view ?