Remote SSH into Mac unicode prompt characters not rendered correctly #12077

Closed
opened 2026-01-31 03:05:48 +00:00 by claunia · 8 comments
Owner

Originally created by @amoldeshpande on GitHub (Jan 15, 2021).

Environment

Windows build number: 18363.1256
Windows Terminal version (if applicable):Version: 1.4.3243.0

Any other software?
Mac OS : Catalina

Steps to reproduce

  1. ssh into MacOS configured with "oh my posh" unicode prompt.
  2. Unicode characters render as junk

Please note that in the same terminal I can see unicode correctly in my local prompts. I have Nerd Fonts installed and everything oh-my-posh-wise works fine locally.

I am using ssh from the latest Git For Windows (2.30)

Expected behavior

Prompt should render correctly

Actual behavior

Unicode characters are not renedered instead I see squares.

Is there something I should be doing to make this work ?

thanks

Originally created by @amoldeshpande on GitHub (Jan 15, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment Windows build number: 18363.1256 Windows Terminal version (if applicable):Version: 1.4.3243.0 Any other software? Mac OS : Catalina # Steps to reproduce 1. ssh into MacOS configured with "oh my posh" unicode prompt. 2. Unicode characters render as junk Please note that in the same terminal I can see unicode correctly in my local prompts. I have Nerd Fonts installed and everything oh-my-posh-wise works fine locally. I am using ssh from the latest Git For Windows (2.30) # Expected behavior Prompt should render correctly # Actual behavior Unicode characters are not renedered instead I see squares. Is there something I should be doing to make this work ? thanks
Author
Owner

@zadjii-msft commented on GitHub (Jan 15, 2021):

Which font are you using specifically? Could you share your settings.json (or at least the relevant profile)?

@zadjii-msft commented on GitHub (Jan 15, 2021): Which font are you using specifically? Could you share your `settings.json` (or at least the relevant profile)?
Author
Owner

@amoldeshpande commented on GitHub (Jan 15, 2021):

I am using MesloLGM NF. This is my global setting for all profiles. A Windows pane in the same terminal has no trouble with the glyphs.

"defaults":
{
// Put settings here that you want to apply to all profiles.
"fontFace" : "MesloLGM NF",
"colorScheme": "Solarized Dark"
},

@amoldeshpande commented on GitHub (Jan 15, 2021): I am using MesloLGM NF. This is my global setting for all profiles. A Windows pane in the same terminal has no trouble with the glyphs. "defaults": { // Put settings here that you want to apply to all profiles. "fontFace" : "MesloLGM NF", "colorScheme": "Solarized Dark" },
Author
Owner

@DHowett commented on GitHub (Jan 17, 2021):

Can you share the output of running locale? I am betting that git bash is not configured properly to pass UTF-8 to the Terminal.

@DHowett commented on GitHub (Jan 17, 2021): Can you share the output of running `locale`? I am betting that git bash is not configured properly to pass UTF-8 to the Terminal.
Author
Owner

@amoldeshpande commented on GitHub (Jan 17, 2021):

I was using my own tcsh, not bash. But I also tried powershell and git bash to eliminate that variable.

I cannot access my work Mac until Monday, but interestingly my old macbook at home seems to behave correctly. locale in both cases is empty (I can't verify the work Mac right now, but that is what I recall from trying to troubleshoot yesterday) :

This is from my macbook at home, running powershell in Windows Terminal, which seems to have no trouble with emoji.

~>set prompt="(%{\360\237\230\201%})>"

Correct to set prompt(%{\360\237\230\201%})>" ?(y|n|e) no
(😁)>locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
(😁)>

The only difference is that the work Mac mini is Catalina, while this one is High Sierra. I will append the output of locale from the mini on Monday.

@amoldeshpande commented on GitHub (Jan 17, 2021): I was using my own tcsh, not bash. But I also tried powershell and git bash to eliminate that variable. I cannot access my work Mac until Monday, but interestingly my old macbook at home seems to behave correctly. `locale` in both cases is empty (I can't verify the work Mac right now, but that is what I recall from trying to troubleshoot yesterday) : This is from my macbook at home, running powershell in Windows Terminal, which seems to have no trouble with emoji. ``` ~>set prompt="(%{\360\237\230\201%})>" Correct to set prompt(%{\360\237\230\201%})>" ?(y|n|e) no (😁)>locale LANG= LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= (😁)> ``` The only difference is that the work Mac mini is Catalina, while this one is High Sierra. I will append the output of `locale` from the mini on Monday.
Author
Owner

@DHowett commented on GitHub (Jan 17, 2021):

I am betting that git bash (me)

I was using my own tcsh (you)

Sorry, I should be more clear. I am betting that the msys2 runtime that the version of SSH shipped with git bash is using, and that your build of tcsh (I'm guessing) also likely uses, is not passing UTF-8 properly. 😄

@DHowett commented on GitHub (Jan 17, 2021): > I am betting that git bash (me) > I was using my own tcsh (you) Sorry, I should be more clear. I am betting that the msys2 runtime that the version of SSH shipped with git ~bash~ is using, and that your build of tcsh (I'm guessing) also likely uses, is not passing UTF-8 properly. :smile:
Author
Owner

@amoldeshpande commented on GitHub (Jan 17, 2021):

I am betting that git bash (me)

I was using my own tcsh (you)

Sorry, I should be more clear. I am betting that the msys2 runtime that the version of SSH shipped with git bash is using, and that your build of tcsh (I'm guessing) also likely uses, is not passing UTF-8 properly. 😄

Actually it doesn't. Which is why also I tried the other two shells :-)

@amoldeshpande commented on GitHub (Jan 17, 2021): > > I am betting that git bash (me) > > > I was using my own tcsh (you) > > Sorry, I should be more clear. I am betting that the msys2 runtime that the version of SSH shipped with git ~bash~ is using, and that your build of tcsh (I'm guessing) also likely uses, is not passing UTF-8 properly. 😄 Actually it doesn't. Which is why also I tried the other two shells :-)
Author
Owner

@DHowett commented on GitHub (Jan 17, 2021):

Right, but since the version of SSH shipped with git does, it’s still in the mix.

@DHowett commented on GitHub (Jan 17, 2021): Right, but since the version of SSH shipped with git _does_, it’s still in the mix.
Author
Owner

@amoldeshpande commented on GitHub (Jan 18, 2021):

ok, turns out to be user error. LANG was not set and once I set it as above, it works fine. thanks!

@amoldeshpande commented on GitHub (Jan 18, 2021): ok, turns out to be user error. LANG was not set and once I set it as above, it works fine. thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12077