From ffb0f99b7ba6032d3a5c90dfd10ccffe9941dbfa Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 29 Aug 2016 09:27:12 -0400 Subject: Fixed potential crash on Windows with filter-through and some locales. cmd.exe can choke on outputting some non-ASCII characters. --- modules/textadept/editing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/textadept') 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 -- cgit v1.2.3