Windows Terminal fails to launch PowerShell or Command Prompt correctly when the configured start folder contains non-English characters, such as Asian scripts, due to encoding mismatches between the terminal emulator and the system locale. This issue typically manifests as a blank screen, an immediate crash, or an error message indicating that the directory cannot be found or accessed. The root cause is often related to how Windows handles UTF-8 encoding for legacy console applications versus modern terminal interfaces.
To resolve this, you must ensure that your system's language settings support Unicode and that the terminal configuration explicitly requests UTF-8 output. Additionally, verifying the integrity of the profile settings in the JSON configuration file can prevent path resolution errors caused by special character interpretation.
Understanding the Encoding Mismatch
The primary reason for this failure lies in the difference between ANSI and UTF-8 encoding. Older versions of Windows and some command-line tools default to the system's active code page, which may not support complex character sets like Chinese, Japanese, or Korean. When Windows Terminal attempts to change the working directory to a path containing these characters, it may fail if the session is not explicitly set to use UTF-8.
Modern versions of Windows 10 and 11 have improved support for UTF-8 globally, but specific applications or profiles might still inherit legacy settings. If your system locale is set to a region that does not natively use these scripts, the terminal might struggle to parse the path string correctly during initialization.
Configuring System Locale Settings
Before modifying terminal-specific settings, ensure that your operating system is prepared to handle non-English characters in file paths. This involves enabling beta features for Unicode support in older Windows builds or simply ensuring the correct language pack is installed.
Follow these steps to adjust your system locale:
- Navigate to Settings > Time & Language > Language & Region.
- Select Administrative Language Settings from the right-hand pane or search box.
- In the Region dialog box, go to the Administrative tab.
- Click on Change system locale....
- Ensure that the current system locale matches the language of your folder names (e.g., Simplified Chinese).
- If available, check the box for Beta: Use Unicode UTF-8 for worldwide language support. Note that this feature may affect compatibility with older software.
- Restart your computer for changes to take effect.
After restarting, test opening a standard Command Prompt to see if it recognizes the non-English directory. If the issue persists, proceed to configure Windows Terminal specifically.
Modifying Windows Terminal Configuration
Windows Terminal stores its profiles in a
settings.json file. You can edit this file directly to enforce UTF-8 encoding for specific shells. This is often more reliable than changing global system settings because it isolates the fix to the terminal application.
Open Windows Terminal and press
Ctrl + , to open the settings editor. Locate the profile for PowerShell or Command Prompt that is failing. Look for the
startingDirectory field. Ensure that the path is absolute and uses forward slashes (
/) rather than backslashes, which can sometimes cause parsing issues with international characters.
For PowerShell, add the following command to the
commandLine or initialize script to force UTF-8 mode:
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
If you are using Command Prompt, you may need to specify the code page manually at startup. In the
commandLine field for the CMD profile, prepend the code page switch:
cmd.exe /k chcp 65001
This command sets the console code page to 65001, which is the identifier for UTF-8. Save the settings and try launching the profile again.
Verifying Path Integrity
Sometimes, the issue is not encoding but rather how the path is stored in the profile. Special characters in file names can interfere with JSON syntax if not properly escaped. While Windows Terminal generally handles UTF-8 strings well, it is prudent to verify that the path does not contain hidden control characters or incorrect quotation marks.
Check the
startingDirectory value in your
settings.json file. It should look something like this:
"startingDirectory": "C:\\Users\\Name\\Documents\\日本語フォルダ"
Ensure that the path exists exactly as written. You can copy the path from File Explorer and paste it into the terminal to verify accessibility. If the terminal opens successfully when you type the path manually, the issue is likely confined to the profile configuration.
For more insights on managing PowerShell environments, see our guide on
Using PowerShell Terminal on Windows. This resource covers additional scripting tips that may help automate environment setup.
Frequently Asked Questions
Why does my terminal show garbled text instead of crashing?
Garbled text indicates that the terminal is interpreting UTF-8 bytes as a different code page, such as ASCII or ISO-8859-1. To fix this, ensure that both the system locale and the terminal's internal encoding are set to UTF-8. Updating Windows Terminal to the latest version from the Microsoft Store often resolves these rendering bugs.
Can I use WSL with non-English directories?
Yes, Windows Subsystem for Linux (WSL) supports non-English paths, but you must ensure that the Linux distribution itself has appropriate locale settings installed. Inside WSL, run
sudo update-locale LANG=en_US.UTF-8 or your preferred locale to ensure consistent character handling across the host and guest systems.
What if I cannot find the Administrative Language Settings?
In newer versions of Windows 11, the option may be nested differently. Search for "Control Panel" in the Start menu, then navigate to
Clock and Region >
Region. The administrative tab remains in the same location within the legacy Control Panel interface, providing access to system locale changes.
Does this issue affect Git Bash or other third-party terminals?
Third-party terminals like Git Bash or Cmder may have their own encoding configurations independent of Windows Terminal. You will need to check their respective configuration files, such as
.bashrc for Git Bash, to ensure they also request UTF-8 output. Each terminal emulator manages its own environment variables separately.
Is it safe to enable the Beta UTF-8 system locale?
Enabling the Beta UTF-8 setting is generally safe for most modern applications, but it can break legacy software that relies on the previous code page for input/output. Test critical business applications after enabling this feature. If issues arise, revert the setting to the default regional format.