1. 程式人生 > >java程式應為CRT登入時啟動未設定編碼,造成啟動亂碼

java程式應為CRT登入時啟動未設定編碼,造成啟動亂碼

1、以下提供CRT連線程式設定編碼指令碼,字尾為“.vbs”

# $language = "VBScript"
# $interface = "1.0"

Sub Main
crt.Screen.Synchronous = True

crt.Screen.WaitForString "$ "
crt.Screen.Send "export LANG=zh_CN.utf-8" & vbCr
crt.Screen.Send "ssh 使用者名稱@IP地址" & vbCr
crt.Screen.WaitForString "assword"
crt.Screen.Send "密碼" & vbCr

crt.Screen.Synchronous = False
End Sub