[jedit:plugin-bugs] #1923 buffer-local-property encoding not taken into account in the Templates plugin
Harry KARADIMAS via jEdit-devel <[email protected]>
| Newsgroups | gmane.editors.jedit.devel |
|---|---|
| Message-ID | <[email protected]> |
---
** [plugin-bugs:#1923] buffer-local-property encoding not taken into account in the Templates plugin**
**Status:** open
**Group:**
**Created:** Tue Nov 15, 2022 09:19 PM UTC by Harry KARADIMAS
**Last Updated:** Tue Nov 15, 2022 09:19 PM UTC
**Owner:** nobody
If you put a buffer-local-property like this :
:encoding=UTF-8:
into a vm template it will not be taken into account when the file will be generated.
The buffer will still be in the native encoding (cp1252 in my Windows 11 for ex.).
This is confusing and I often got caught in this issue.
I found a workaround, I add these 4 lines somewhere in the template :
#beanshell (false)
buffer.setStringProperty(buffer.ENCODING, "UTF-8");
view.getStatus().updateBufferStatus();
#end
Hope it helps.
(jEdit 5.6.0, Templates plugin 5.0.3)
---
Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/jedit/plugin-bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/plugin-bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
--
-----------------------------------------------
jEdit Developers' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-devel