0

After changing code page on my windows-10 machine, I realized that when I connect to a server via ssh through any console (git-bash, windows-cmd, power-shell etc) after typing a few words on the console(when ssh connection is open), the connection will close and I must reconnect again (Connection reset by IP-Address Port 22). The problem is not with the server, as when I connect to the server through other machines everything is OK. This problem arose when I wanted to type Persian characters on the console, so I changed the code page to 65001 using this command on cmd.exe

chcp 65001

And then I changed the fonts of the console so I could type Unicode (Persian) characters later. after that, I changed the code page to 1252 and 720 again. Now when I type chcp on the cmd.exe it gives Active code page: 720. When I googled the problem I saw that code page 65001 has had some bugs on windows and I think the problem with disconnecting ssh connection on any console is related to changing the code pages. I don't know how to fix it.

Any helps will be appreciated.

ako
  • 101
  • 2
  • Codepage change through `chcp` is not persistent. It's effective only in a current `cmd.exe` session. – montonero Mar 14 '19 at 09:50
  • @montonero I know that, but after that still, I have the problem. – ako Mar 14 '19 at 10:26
  • You do **not** need `chcp 65001`. AFAIK, all _Perso-Arabic alphabet_ is rendered correct in a `cmd` window using common _Courier New_ font, regardless of current _codepage_ (˙chcp˙ command). You _type_ Persian using a proper [keyboard layout](https://docs.microsoft.com/en-gb/globalization/keyboards/kbdfar.html) – JosefZ Mar 17 '19 at 16:19
  • After several restarts of my machine, the problem solved. – ako Mar 18 '19 at 07:58

0 Answers0