PreviousNextTracker indexSee it online !

(188/212) 488 - Mode Property: Default Encoding

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?

Submitted ezust - 2014-07-21 16:15:47.690000 Assigned
Priority 5 Labels
Status open Group none
Resolution None

Comments

2014-07-23 14:41:15.192000
kpouer

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.

2015-08-08 18:32:57.486000
daleanson

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?