Skip to content

What's the reason for not showing encoding in the status line right from the start? #86

@ams-tschoening

Description

@ams-tschoening

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:

Clipboard01
Clipboard02
Clipboard03

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions