Skip to content

Conversation

@hoto17296
Copy link

fixes #53

Problem

When current path contains multibyte characters, action to open new tab fails.

$ mkdir 日本語
$ cd 日本語

Cause

  1. LANG env is empty when the command is executed from child_process.exec.
  2. When LANG env is empty, the multibyte characters contained in the result of the lsof command are escaped.
    • e.g. /path/to/dir/日本語 -> /path/to/dir/\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e
  3. Due to No such directory error, SESSION_SET_CWD event fails.
  4. The action to open a new tab fails.

Solution

Specify LANG=en_US.UTF-8 when execute lsof command.

@hoto17296
Copy link
Author

@hharnisc Could you review this PR? I really want to fix #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't open new tab when current path contains multibyte characters

1 participant