FluentTerminal icon indicating copy to clipboard operation
FluentTerminal copied to clipboard

UTF-8

Open hanskokx opened this issue 5 years ago • 15 comments

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

hanskokx avatar Jul 04 '19 14:07 hanskokx

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

maxhora avatar Jul 06 '19 06:07 maxhora

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

maxhora avatar Jul 06 '19 06:07 maxhora

Oh, yeah. Sorry - that would have been useful. I'm on Win10 1903, running mosh 1.3.2

hanskokx avatar Jul 06 '19 22:07 hanskokx

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?

mjs avatar Jul 22 '19 23:07 mjs

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/felixse/FluentTerminal/issues/430?email_source=notifications\u0026email_token=AAOSY34R5OH6GXBQ4VVXMHLQAZBKBA5CNFSM4H53CZU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2RPNNY#issuecomment-513996471", "url": "https://github.com/felixse/FluentTerminal/issues/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" } } ]

hanskokx avatar Jul 23 '19 13:07 hanskokx

@skipmeister123 looks like something went wrong here...

mjs avatar Jul 29 '19 21:07 mjs

Can you elaborate, please?

hanskokx avatar Jul 30 '19 13:07 hanskokx

[ { "@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

felixse avatar Aug 03 '19 09:08 felixse

Strange.  I asked for additional details.

hanskokx avatar Aug 04 '19 16:08 hanskokx

@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 (https://github.com/xtermjs/xterm.js/pull/2362).

jerch avatar Aug 19 '19 21:08 jerch

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!

szymczag avatar Jun 05 '20 12:06 szymczag

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

lemchen avatar Jul 11 '20 03:07 lemchen

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=

Toby222 avatar Aug 13 '21 18:08 Toby222

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".
(...)


kenden avatar Jun 21 '22 12:06 kenden

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".

yuhc avatar Nov 11 '22 03:11 yuhc