aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/editing.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-08-29 09:27:12 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-08-29 09:27:12 -0400
commitffb0f99b7ba6032d3a5c90dfd10ccffe9941dbfa (patch)
treeb2487761e1461d2cfdf82cfb0e25916ebff9e4f9 /modules/textadept/editing.lua
parent1d1259196c1fcfb7daab6c987d13a57672a4f4d6 (diff)
downloadtextadept-ffb0f99b7ba6032d3a5c90dfd10ccffe9941dbfa.tar.gz
textadept-ffb0f99b7ba6032d3a5c90dfd10ccffe9941dbfa.zip
Fixed potential crash on Windows with filter-through and some locales.
cmd.exe can choke on outputting some non-ASCII characters.
Diffstat (limited to 'modules/textadept/editing.lua')
-rw-r--r--modules/textadept/editing.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index f3c7223a..238db220 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -518,7 +518,7 @@ function M.filter_through(command)
local p = spawn(command)
p:write(buffer.target_text)
p:close()
- buffer:replace_target(p:read('*a'))
+ buffer:replace_target(p:read('*a'):iconv('UTF-8', _CHARSET))
if s ~= e then
buffer:set_sel(buffer.target_start, buffer.target_end)
else