Unable to display correctly special characters like graph lines in Terminals
Bastillion gives you a clean, browser-based way to manage SSH access a
Brought to you by:
skavanagh6
Originally created by: Dando-Real-ITA
Hi, I am using version 3.14.0 and I am unable to view correctly characters like lines in a graph:
This is a view from a normal ssh terminal:
Output of locale:
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
and $LANG is C.UTF-8
Also when using tmux, the bottom status bar has problems rendering, for example it "piles up" showing multiple times like here:
Originally posted by: Dando-Real-ITA
I did more testing, and seems to be related to the way GSON handles data in java side.
For example, testing input by sending
ạis correctly encoded in javascript by JSON.stringify, then is send as binary data via connection.send.However the terminal output displays a "?"
And writing in the terminal:
printf "\u1EA1\n"and executing, deliveres to javascript an e.data already broken (notice the���instead ofạ):Maybe could be related for output to using sendText instead of sendBinary here: https://github.com/bastillion-io/Bastillion/blob/d1e88b8578ab81edd7184ea7864bbf7647139422/src/main/java/io/bastillion/manage/task/SentOutputTask.java#L49
And for input, here: https://github.com/bastillion-io/Bastillion/blob/d1e88b8578ab81edd7184ea7864bbf7647139422/src/main/java/io/bastillion/manage/socket/SecureShellWS.java#L70
It is accepting onMessage String which is UTF-16, instead of binary to be decoded as UTF-8 with
StandardCharsets.UTF_8before parsing with GSON