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

UTF-8 #430

Open
hanskokx opened this issue Jul 4, 2019 · 15 comments
Open

UTF-8 #430

hanskokx opened this issue Jul 4, 2019 · 15 comments

Comments

@hanskokx
Copy link
Contributor

hanskokx commented Jul 4, 2019

I can't connect to my MOSH server because the terminal uses US-ASCII rather than UTF-8. There's no option to configure this, either.

image

@maxhora
Copy link
Collaborator

maxhora commented Jul 6, 2019

@skipmeister123 could you please give the version number of mosh installed on your remote machine?
So far can't repro this.

@maxhora
Copy link
Collaborator

maxhora commented Jul 6, 2019

@skipmeister123 also, could you please specify Windows 10 version and build from winver

@hanskokx
Copy link
Contributor Author

hanskokx commented Jul 6, 2019 via email

@mjs
Copy link
Contributor

mjs commented Jul 22, 2019

This looks to be a problem with either the configuration of the server host or the client host. Mosh strictly requires a UTF-8 locale to run. There's not a lot FluentTerminal can do to configure the remote server.

So just to be clear, both the client and remote server are running Windows 1903? Is the SSH server OpenSSH?

@hanskokx
Copy link
Contributor Author

hanskokx commented Jul 23, 2019 via email

@mjs
Copy link
Contributor

mjs commented Jul 29, 2019

@skipmeister123 looks like something went wrong here...

@hanskokx
Copy link
Contributor Author

hanskokx commented Jul 30, 2019 via email

@felixse
Copy link
Owner

felixse commented Aug 3, 2019

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "#430?email_source=notifications\u0026email_token=AAOSY34R5OH6GXBQ4VVXMHLQAZBKBA5CNFSM4H53CZU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2RPNNY#issuecomment-513996471", "url": "#430?email_source=notifications\u0026email_token=AAOSY34R5OH6GXBQ4VVXMHLQAZBKBA5CNFSM4H53CZU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2RPNNY#issuecomment-513996471", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

@skipmeister123 Your email reply was somehow messed up (See quote above). I think GitHub was having some issues this day

@hanskokx
Copy link
Contributor Author

hanskokx commented Aug 4, 2019 via email

@jerch
Copy link

jerch commented Aug 19, 2019

@skipmeister123 Currently xterm.js (the emulator lib behind FluentTerminal) can only operate with JS strings (UTF16 internally) or UTF8 encoded bytes, thus we are bound to UTF world atm. We have a PR open to directly support other encodings as well (xtermjs/xterm.js#2362).

@szymczag
Copy link

szymczag commented Jun 5, 2020

Hi,
first of all, thanks guys for your amazing work, finally we have some real terminal on Windows!

As mentioned above, I have a similar problem with my Ubuntu host.

Here's my host configuration:

~ » mosh-server --version
mosh-server (mosh 1.3.2) [build mosh 1.3.2]
Copyright 2012 Keith Winstein <[email protected]>
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
» dpkg -l |grep mosh
ii  mosh                                   1.3.2+1279-0ppa~ubuntu16.04.1       amd64        Mobile shell that supports roaming and intelligent local echo     
~ » lsb_release -icd
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Codename:       bionic
~ » locale
LANG=
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8

and when I'm trying to connect to this host using a SSH Profile in Fluent Terminal (which is only a username@host, a ssh key and the rest is default) I'm getting the following:

mosh-server needs a UTF-8 native locale to run.

I found some tip on StackOverflow which might be helpful: changing a locale in Terminal by using a chcp.com 65001 command.

I hope that will help you to fix this, thanks!

@lemchen
Copy link

lemchen commented Jul 11, 2020

when the mosh-server use bash environment , fluent can connect to it with no problem, but when the mosh-server in a zsh envrionment, it will issue this problem

@Toby222
Copy link

Toby222 commented Aug 13, 2021

Getting this problem when connecting to an Arch machine

(on server)

> mosh --version
mosh 1.3.2 [build mosh-1.3.2]
> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

@kenden
Copy link

kenden commented Jun 21, 2022

Same issue with:
Fluent Terminal 0.7.7.0
Connecting to Ubuntu:20.04 with mosh-server 1.3.2.

I tried adding environment variables
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
in the Fluent Terminal ssh profile

image

but that doesn't help.

Note:
if I connect to WSL (running Ubuntu:20.04), then mosh from there to the remote machine, it works:

# running
$ mosh --ssh 'ssh -vvv' remotemachine.domain.name
shows:
(...)
debug1: Sending env LANG = en_US.UTF-8
(...)
-> connects successfully

But this fails with the same message if I set the LC_ALL environment variable to en_US.

$ LC_ALL="en_US" mosh --ssh 'ssh -vvv' remotemachine.domain.name
(...)
debug1: Sending env LC_ALL = en_US
(...)
mosh-server needs a UTF-8 native locale to run.

Unfortunately, the local environment (LC_ALL=en_US) specifies
the character set "ISO-8859-1",

The client-supplied environment (LC_ALL=en_US) specifies
the character set "ISO-8859-1".
(...)

@yuhc
Copy link

yuhc commented Nov 11, 2022

Is there any update for this?

mosh-server needs a UTF-8 native locale to run.

Unfortunately, the local environment ([no charset variables]) specifies
the character set "US-ASCII",

The client-supplied environment ([no charset variables]) specifies
the character set "US-ASCII".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants