U
U
User15822019-04-27 23:11:27
linux
User1582, 2019-04-27 23:11:27

What is the difference between connecting via SSH through Putty and via the Ubuntu terminal?

Good afternoon!
Faced a problem when launching a jar file.
I build the jar file using maven based on the raspberry pi board, connecting to it via an ssh terminal.
When I connect via a putty client or from under Windows or from under Linux, I build and then run the file for execution, then everything works well, there are no problems.
However, when I connect directly through the Ubuntu terminal and perform the same build and run operations, the project does not work correctly, in particular the parsers do not work correctly.
The project uses parsers that work with Russian and Ukrainian characters.
As far as I understand it has something to do with the encoding.
I double-checked by building the project connected via putty, but running directly from the Ubuntu terminal and the project does not work fine. Those. the problem is at startup.
I check the encoding using echo $LANG and get the same response everywhere en_GB.UTF-8
Please tell me what exactly is the problem and where to dig further.
What is the difference between connecting via SSH through Putty and via the Ubuntu terminal?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
B
Boris Korobkov, 2019-04-28
@pasha_a

Putty uses the encoding from "Settings" / "Window" / "Translation".
SSH uses your computer's encoding (what does it say locale?). Maybe the server doesn't support it.
Comment out SendEnv LANG LC_*on your computer in a file/etc/ssh/ssh_config

U
uaVPS, 2019-04-27
@uaVPS

Try the following
Check that you have selected the correct encoding You
can also try to do

export LC_ALL=ru_RU.UTF-8
export LANG=ru_RU.UTF-8
export LANGUAGE=ru_RU.UTF-8

L
lexas, 2019-04-28
@lexas

Most likely the parsers inside the java application use the default encoding.
As a solution, you can consider:
- set the variables user.language, user.country and user.variant
example:
java -Duser.language=ru -Duser.country=RU -cp ....
- if the source code is available, then I would removed the use of default encodings and explicitly passed the necessary encodings.
- Well, as an option, you can look. environment variables when connecting.

M
metajiji, 2019-04-28
@metajiji

Putty defaults to koi8-ru as the encoding. Under linux, macOS and other nix terminals, utf8 is the default. Check your terminal settings in putty (this is not the locale, but the character display of the terminal.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question