Open hoto17296 opened 6 years ago
fixes #53
When current path contains multibyte characters, action to open new tab fails.
$ mkdir 日本語 $ cd 日本語
LANG
child_process.exec
lsof
/path/to/dir/日本語
/path/to/dir/\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e
No such directory
SESSION_SET_CWD
Specify LANG=en_US.UTF-8 when execute lsof command.
LANG=en_US.UTF-8
@hharnisc Could you review this PR? I really want to fix #53
fixes #53
Problem
When current path contains multibyte characters, action to open new tab fails.
Cause
LANG
env is empty when the command is executed fromchild_process.exec
.LANG
env is empty, the multibyte characters contained in the result of thelsof
command are escaped./path/to/dir/日本語
->/path/to/dir/\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e
No such directory
error,SESSION_SET_CWD
event fails.Solution
Specify
LANG=en_US.UTF-8
when executelsof
command.