Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Can't open new tab when current path contains multibyte characters #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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