You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But then I realized may be not, as msetlocale() also gets called not only in ssh, but also in scp, sftp, ssh-keygen, which probably don't open a raw-mode console. I suspect msetlocale(), which gets called earlier, should query with GetConsoleOutputCP the prior state. It can't return that state, such that the caller could restore the prior state, e.g. in a function registered with atexit(), because the original utf8.c:msetlocale() is a wrapper around setlocale() that doesn't save any state, because on Unix setlocale doesn't change any state outside the current process, unlike SetConsoleOutputCP, which does affect the console state beyond the lifetime of the current process. So perhaps registering an atexit() function to restore the CP state from within contrib/win32/win32compat/win32-utf8.c:msetlocale() is a better thing to do here?
I wrote a workaround to address the #2027 issue.
The compilation was successful and confirmed that the event could be avoided. PowerShell/openssh-portable#666
Prerequisites
Steps to reproduce
Open command prompt and just run scp, sftp, ssh or ssh-keygen command.
Expected behavior
Actual behavior
Error details
No response
Environment data
Version
9.1.0.0
Visuals
No response
The text was updated successfully, but these errors were encountered: