-
Notifications
You must be signed in to change notification settings - Fork 690
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
Most Glyphs not showing on macOS - E.g. Menu Glyphs and Character Map #949
Comments
The scrolling thing happens on Windows too. Would you please do me the favor of running the Character Map scenario, selecting Box Drawing & Geometric Shapes, take a screenshot and post here? I don't know how to use a mac. Also please post what typeface is being used in this GIF. |
Da fuq? That's a pretty bad/deep bug. I wonder what I did wrong? As you scroll up/down do ANY glyphs show? |
I don't have time to dive into this today or tomorrow. But it seems there's some silly configuration related bug in ConsoleDriver/CursesDriver when running on Mac based on this. |
Hey @mklement0 - you seem like you know what you are doing on a Mac. Can you help us with this? |
I also see the symptom, both in Terminal and iTerm2, and it seems that any non-ASCII-range character isn't recognized - even a window title such as I know the Mac primarily from a shell perspective and know nothing about ncurses, so in order to be helpful I would need guidance. Don't know if it's relevant, but skimming the source code I see
In my case it is |
Mine was " |
|
I only changed from the preferences of the |
I had some misconceptions:
Returning to the ncurses library: On macOS, there's only one binary, The version that ships with macOS 10.15.7 is quite old ( From
The mystery is that Terminal.Gui does call One thing worth looking into: Is the |
Thanks. Yes the |
Can we find the source to any console GUI apps that show these glyphs correctly on MacOS? I mean there's got to be other apps that work? Actually, now that I think about it, I'm pretty sure PowerShell with |
@tig I don't have it either. I just installed it on VMware. |
The glyphs seem to render fine (please confirm): If I run the following on macOS from PowerShell (from the project root; the command extracts the Unicode chars. from '"{0}"' -f -join ([regex]::Matches((gc -raw ./Terminal.Gui/Core/ConsoleDriver.cs), "\\u....").Value -replace '\\u', '`u{' -replace '$', '}') | iex I get:
|
It gives an " |
What I posted is a PowerShell command, so it only makes sense to run it from inside PowerShell ( How did you try to install PowerShell? The package downloadable from https://github.com/PowerShell/PowerShell#get-powershell should work. If you have Homebrew installed, you can also try: brew tap caskroom/cask; brew cask install powershell |
Through this link https://github.com/dotnet/core/blob/master/release-notes/3.0/3.0-supported-os.md#macos. It give this message on the
I'll try with |
If |
ncurses isn't sending UTF-8 to the terminal (it is sending ISO-8859-1, always), so we need to figure out why. By the way, given that Terminal.Gui can only ever work as expected with UTF-8, the right thing to do would be to refuse startup if the terminal window's character encoding is found to be something other than UTF-8. |
Hello, The posters are right, this is a problem with ncurses, not really an issue with the terminal. What might be happening is that ncurses is being initialized implicitly by some code before setlocale is invoked. Perhaps an additional dependency, or some invocation to the library is taking place that loads and initializes ncurses before we call setlocale. One quick way of testing this theory would be to call
Before anything else - also, not sure if we are now using global constructors (the ones that run on assembly load), that could also be initializing curses before we have a chance to. |
Thanks @migueldeicaza, I tried, but I was unsuccessful. I think the new version of ncurses forces us to save the initial state and restore it on exit, something extra that |
I find that surprising, what version of MacOS is doing that? How do I reproduce that second problem? |
Sorry. This only happens on |
About most of the glyphs not printing on
|
What terminals are you using here? |
WSL Ubuntu itself on Windows and the Ubuntu Terminal on the virtual machine with Ubuntu installed. |
See #41 I've already been down this path... |
…m.Rune and System.Text.Rune.
Re macOS: The As an aside: The strange thing is that I eventually did get the glyphs to render correctly, namely by setting Similarly strangely, querying the effective |
Yes. I'll investigate. LC_ALL should work unless there is a gap in bitwise that does not cover all others. |
Thanks, @BDisp, but the logic of
That is, the |
@ mklement0 thank you very much for your commitment. Your research is of enormous value. I hope you can come up with the solution to this because I'm already burning the fuses :-) |
Hello, @mklement0 found the culprit, the issue is that the
I do not know what the value is on Linux, but if it is not zero, then we will need to check the OS and use 0 on Mac, and 6 o Linux. |
Also, for good measure, we should change setlocale to return an |
…m.Rune and System.Text.Rune.
Can someone please verify that this is fixed? I don't have/use a mac. Thanks. |
I uninstalled |
It looks like the problem is still present, since the macOS-specific with the following seems to work: static public int LC_ALL { get; private set; }
static Curses() {
LC_ALL = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX) ? 0 : 6;
} |
It's possible to scroll top and see the old screen. It's a weird and ugly situation. Its happens with the
Terminal
and evenITerm2
.The text was updated successfully, but these errors were encountered: