Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.67.2 OS Version: MacOS Monterey 12.4 (default zsh terminal) Steps to Reproduce: a folder containing an "Umlaut" (äöü) folder in VSCode and launch/use a terminal (for testing I used echo something in zsh) VSCode restarting, VSCode fails to restore previous session as "the directory doesn't exist" However, if there is no "Umlaut" included in the path somewhere, this problem won't occur. This issue should affect at least all german VSCode-Users (like me) who want to open a folder on their Mac located in OneDrive. The problem is that the filepath for such files looks like "~/Library/CloudStorage/OneDrive-Persönlich/..." and restoring a session isn't possible for any folder/file in OneDrive, which is a little bit inconvenient. There might also just be a problem with my terminals encoding (currently set to UTF-8 so should work I guess) that it can't open the working directory with how it spells (in this case) the ö in the filepath: <img width="390" alt="Bildschirmfoto 2022-05-23 um 00 04 17" src="https://user-"(when I try to cd to that filepath it doesn't recognize the oxccx88 as ö and says the path doesn't exist) Thanks for help in advantage :) Greetings, Fussel
Related:
Is this a windows issue only? I can't replicate this issue. I'm running Arch Linux.
the OP reported on macOS which shares most code with Linux
I'm trying to replicate the issue because I want to see if I can contribute to fixing it, but I can't seem to replicate it. I have a folder named "äöü" and I open the integrated terminal and run "echo hey". I close VSCode and reopen it, but it restores the session like it's supposed to. I even tried running a task that runs "echo hey" and it does the same.
do you close all VS Code windows and reopen? Just closing one of many will keep the original process running and reconnect to it.
I am trying to trace this bug. But it is kind of tricky because it is NOT reproducable on OSS dev build. It is reproducable on stable or latest insider production release though. On production release, after running a command in the terminal, somehow Unicode characters in the current path was saved incorrectly. (You can also see an incorrect terminal title updated.) On OSS dev build, Unicode characters in the path seems saving correctly and there is no issue restoring or splitting the terminal.
that's odd, could it be one of your settings?
I have zero settings for insider and OSS dev version. I only have some settings for the stable version. My system environment is same as OP's.
Attached a video to show the issue. https://user-
I wonder why this isn't happening in OSS: ! I think you must have settings in Insiders there because the default value is just ? Unless that's the same format zsh outputs its title?
No. I don't have any settings for insider. ! The final tab title is affected by other settings such as or ! After some testing, I can confirm that isn't updated into title sometimes. It might be another bug there but it is off-topic.
It seems like event fired unexpectedly with wrong path.
I also tried to reproduce the problem on Ubuntu but I wasn't successful (both the original problem and the split-terminal one). I even tried Persian and Arabic special letters but still had no chance.
To verifier: When testing make sure shell integration is off

Discussion:
return; } this._logService.trace('IPty#pid'); <del> exec('lsof -OPln -p ' + this._ptyProcess.pid + ' | grep cwd', (error, stdout, stderr) => { </del> <ins> exec('lsof -OPln -p ' + this._ptyProcess.pid + ' | grep cwd', { env: { ...process.env, LANG: 'en_US.UTF-8' } }, (error, stdout, stderr) => { </ins> if (!error && stdout !== '') { resolve(stdout.substring(stdout.indexOf('/'), stdout.length - 1)); } else {