yyx990803 / launch-editor

Open file in editor from Node.js.
MIT License
585 stars 67 forks source link

fix: compatible for windows path with Chinese characters #83

Open zh-lx opened 2 weeks ago

zh-lx commented 2 weeks ago

close #82

On windows, when the path has Chinese characters, the output of processes from powershell will has messy code.

So before exec powershell -NoProfile -Command "Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }". We need exec chcp 65001 to make the output compatible for Chinese characters firstly.