fix(windows): can delete non-ascii filenames to trash (#323)
This commit is contained in:
parent
c437f3c5b0
commit
18dfd2458d
2 changed files with 5 additions and 10 deletions
|
|
@ -27,15 +27,12 @@ end
|
|||
|
||||
---@param init_command? string
|
||||
function PowershellConnection:_init(init_command)
|
||||
-- 65001 is the UTF-8 codepage
|
||||
-- powershell needs to be launched with the UTF-8 codepage to use it for both stdin and stdout
|
||||
local jid = vim.fn.jobstart({
|
||||
"powershell",
|
||||
"-NoProfile",
|
||||
"-NoLogo",
|
||||
"-ExecutionPolicy",
|
||||
"Bypass",
|
||||
"-NoExit",
|
||||
"-Command",
|
||||
"-",
|
||||
"cmd",
|
||||
"/c",
|
||||
'"chcp 65001 && powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -NoExit -Command -"',
|
||||
}, {
|
||||
---@param data string[]
|
||||
on_stdout = function(_, data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue