Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文无法输入、[误]查看二进制的文件ws中断 #6

Open
staugur opened this issue Jul 21, 2022 · 5 comments
Open

中文无法输入、[误]查看二进制的文件ws中断 #6

staugur opened this issue Jul 21, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@staugur
Copy link

staugur commented Jul 21, 2022

大佬好:

发现了这款webssh,测试了常用的命令都挺顺畅,"录像"回放功能挺好,不过就发现命令行无法输入中文,显示没问题,前端用的是 xterm.js 应该支持中文吧?

然后就是已知 issue #4 提到的 cat 图片中断,head/tail等查看二进制都会中断~

@widaT
Copy link
Owner

widaT commented Jul 26, 2022

cat 中断问题解决了。中文输入的问题,还没解决。问题应该在前端,你们可以尝试fork代码解决下

@widaT widaT added the bug Something isn't working label Jul 26, 2022
@yuanhao2015
Copy link

yuanhao2015 commented Jul 26, 2022

还是有问题
image

@widaT
Copy link
Owner

widaT commented Jul 27, 2022

还是有问题 image

你是不是更新代码,没有重新去front下面 npm run build?看起来像前端代码,没生效。

@yuanhao2015
Copy link

前端也是用你的最新的代码打包的,还是不行

@go1223
Copy link

go1223 commented Apr 27, 2023

将 terminal.onKey 改为了 terminal.onData,这样就可以支持中文输入了,更改代码如下:
terminal.onData((data) => {
webSocket.send(msgData + Base64.stringify(Utf8.parse(data)), ArrayBuffer)
})
大家可以试试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants