Open zhang-stephen opened 1 year ago
What exact command to I need to enter to reproduce step 1?
I think the display language should be set in settings app. This link would help you to change the display language of Windows 10/11.
Function do_log()
calls strnvis()
to prepare that string for display, and looking at openbsd-compat/vis.c, I can see there the code that makes these backslash-octal substitutions in function vis()
. Right before it there is an #ifdef WINDOWS
and if (flag & VIS_LOG_UTF16)
to make that function a bit more 8-bit transparent.
I can also see in log.c
#ifdef WINDOWS
#define LOG_SYSLOG_VIS (VIS_CSTYLE|VIS_NL|VIS_TAB|VIS_OCTAL|VIS_LOG_UTF16)
#else
#define LOG_SYSLOG_VIS (VIS_CSTYLE|VIS_NL|VIS_TAB|VIS_OCTAL)
#endif
#define LOG_STDERR_VIS (VIS_SAFE|VIS_OCTAL)
which suggests that this only applies to syslog, but not to stderr.
I haven't found yet where any of this substitution behaviour might depend on the locale setting.
I just found this issue could be reproduced in active code page 936, the GBK encoding for simplified Chinese. It is possible this issue is irrelative to encoding.
Then I have no more idea about the root cause. 😕
P.S. It could be reproduced in active code page 437, the US code page, too...
I was trying to get OpenSSH on Ubuntu Linux 20.04 to say Name or service not known
in any language other than English, to see if the same problem exists there, but I'm now not sure that is even possible.
Perhaps OpenSSH on Unix-like environments doesn't even support translated error messages, which presumably would require use of stderror_l
instead of stderror
(and I can't see the former used).
Perhaps only the Windows version will even try to output non-ASCII error messages?
I got this non-ascii output on Windows Powerhell only, the cmd.exe is not tested.
Prerequisites
Steps to reproduce
chcp 65001
to enable it for testsssh pi@raspberrypi4.locax
P.S. Expected behaviour is demostrated by SSH from msys2.
Expected behavior
Actual behavior
Error details
Environment data
Version
OpenSSH_for_Windows_9.2p1, LibreSSL 3.6.2
Visuals
No response