diff options
author | 2008-12-10 21:25:54 -0500 | |
---|---|---|
committer | 2008-12-10 21:25:54 -0500 | |
commit | 2c41775d8101547a0453945b89423a32aaa046d7 (patch) | |
tree | f5c12c095af647c8ec13b492b8b27e15e3db4184 | |
parent | 54bd520f6085f4e4c04574167bdcc29aa9cc71c5 (diff) | |
download | textadept-2c41775d8101547a0453945b89423a32aaa046d7.tar.gz textadept-2c41775d8101547a0453945b89423a32aaa046d7.zip |
Use UTF8 encoding by default; core/events.lua
-rw-r--r-- | core/events.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/events.lua b/core/events.lua index 451e3af1..f60910b5 100644 --- a/core/events.lua +++ b/core/events.lua @@ -141,7 +141,7 @@ end -- Scintilla notifications. function char_added(n) - return handle( 'char_added', string.char(n.ch) ) + if n.ch < 256 then return handle( 'char_added', string.char(n.ch) ) end end function save_point_reached() return handle('save_point_reached') @@ -288,6 +288,9 @@ add_handler('buffer_new', buffer.lexer = textadept.constants.SCLEX_LPEG buffer:set_lexer_language('container') + -- buffer + buffer.code_page = textadept.constants.SC_CP_UTF8 + if _THEME and #_THEME > 0 then local ret, errmsg = pcall(dofile, _HOME..'/themes/'.._THEME..'/buffer.lua') |