#488 Mode Property: Default Encoding

none
open
nobody
None
5
2015-08-08
2014-07-21
Alan Ezust
No

Python 3.x requires all files to be in UTF-8. I think it is also the default for XML and C++11.
There might be other programming modes that have a required encoding.

Adding it as a mode property and exposing it in the Global Options - Editing option pane would be nice, no?

Discussion

  • Matthieu Casanova

    about XML I'm not sure as you can choose an encoding in the header.
    But I agree if the language require a specific encoding, a property would be a good idea.

     
  • Dale Anson

    Dale Anson - 2015-08-08

    If you add a property tag to the mode file, like this:

    <PROPERTY NAME="encoding" VALUE="UTF-8"/>

    Then the buffer will be loaded with that encoding. This is existing functionality, but isn't documented anywhere that I could find. The encoding will be visible in the Buffer options and the status bar, but not in the Global options. Is this sufficient for this request?

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks