Answer the question
In order to leave comments, you need to log in
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
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
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
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.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question