PowerShell / PowerShell/Win32-OpenSSH
Wrong locale settings used for error hints
Open
Nobody has claimed this yet.
Investigate
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
- use non-English as the default display language, e.g. Simplified Chinese,
- enable experimental UTF-8 support, or use command
chcp 65001to enable it for tests - run ssh with a wrong remote address, e.g.
ssh pi@raspberrypi4.locax - then the error hints will be printed as UTF-8 hexademical values, instead of readable text in Chinese or other languags.
P.S. Expected behaviour is demostrated by SSH from msys2.
Expected behavior
PS C:\Users\stephen> chcp
Active code page: 65001
PS C:\Users\stephen> C:\Users\stephen\workspace0\dev\msys2\usr\bin\ssh.exe pi@raspberrypi4.locax
ssh: Could not resolve hostname raspberrypi4.locax: Name or service not known
Actual behavior
PS C:\Users\stephen> chcp
Active code page: 65001
PS C:\Users\stephen> ssh pi@raspberrypi4.locax
ssh: Could not resolve hostname raspberrypi4.locax: \344\270\215\347\237\245\351\201\223\350\277\231\346\240\267\347\232\204\344\270\273\346\234\272\343\200\202
Error details
No Errors occurred.
Environment data
PS C:\Users\stephen> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.6
PSEdition Core
GitCommitId 7.3.6
OS Microsoft Windows 10.0.25393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
OpenSSH_for_Windows_9.2p1, LibreSSL 3.6.2
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported ssh command with a non-English display language and code page 65001, then trace the error-hint path involved in UTF-8 output on Windows. Done means the wrong-hostname case prints readable localized text rather than escaped UTF-8 hexadecimal values, with regression coverage if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- internationalization, networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100