Looking for another way to deal with #85, I configured the default_encoding for Perl files to be Western (Windows 1252). Intention was that if an .editorconfig defining utf-8 is available, that will simply override the Perl-specific default of Sublime and otherwise using windows-1252 is the right thing to do.
This seems to work as intended, but initially loading a Perl file containing ASCII only with having utf-8 configured in .editorconfig shows Western (Windows 1252) as the current encoding. Only after saving the file this gets changed to UTF-8:
The reason most likely is that view.set_encoding(...) is only called in apply_pre_save instead of in apply_config, like is done for some other settings.
But why is that? If you want to be sure to not show a wrong encoding, that's exactly what happens now. :-) Would you like to change this to show the encoding right from the start? The same seems to apply to line endings.
Looking for another way to deal with #85, I configured the
default_encoding
for Perl files to beWestern (Windows 1252)
. Intention was that if an.editorconfig
definingutf-8
is available, that will simply override the Perl-specific default of Sublime and otherwise usingwindows-1252
is the right thing to do.This seems to work as intended, but initially loading a Perl file containing ASCII only with having
utf-8
configured in.editorconfig
showsWestern (Windows 1252)
as the current encoding. Only after saving the file this gets changed toUTF-8
:The reason most likely is that
view.set_encoding(...)
is only called in apply_pre_save instead of inapply_config
, like is done for some other settings.But why is that? If you want to be sure to not show a wrong encoding, that's exactly what happens now. :-) Would you like to change this to show the encoding right from the start? The same seems to apply to line endings.