-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Windows support #5
Comments
If you are unable to read Unicode characters, it may be because your system is not properly configured. |
The default Windows terminal font doesn't support unicode and unlike macOS, the terminal doesn't fall back to other fonts that do have such character. I would strongly recommend using Bash for Windows instead. If it still doesn't display properly you might need to download a good fallback font. I'd recommend |
Bash for Windows doesn't show the emoji either. Explorer also complains that Noto Color Emoji is not a valid TTF file (googlefonts/noto-emoji#43). Ah, Windows problems. 😕 |
\cc @bitcrazed |
Works ok-ish with Git Bash for Windows |
@adueck Can you share a screenshot? |
I'm on windows too. I get this error when I try to run on git bash.
|
Thanks for looping me in :) Running in Bash on Ubuntu on Windows in Windows 10 Insiders build 14374, I see this: Alas, this highlights the fact that emoji support is currently very limited by the Windows Console. We have plans to fix this in the future, but for now, alas we don't support emoji's sufficiently to make emoj work :( This said, if you would like to see us improve our emoji support in the future, please do upvote some of these issues in our UserVoice: https://wpdev.uservoice.com/forums/266908-command-prompt-console/category/161892-bash?query=UTF-8 |
@aoozdemir Yes, it does that when you try to run it without any argument, in interactive mode. Git Bash has some kind of problem working with with interactive node cli apps. When you install Git Bash it it tells you this and explains some other service that you can use to run those interactive cli apps. There is a way to do this, but I forgot what this is and I can't find it in the documentation. 😢 So I just run it with the argument in the initial command ie. And it seems to work pretty well. (using the default font, |
Ahh! Win terminal bothers me so much lately. ☺ I believe it's time for a brand new, beautiful terminal for Windows (especially for Win10). |
@aoozdemir Are you running the Win10 insiders builds? We've made A LOT of really big improvements to the Console, including big perf improvements, better High-DPI support, lots more VT sequence support (not done yet, but lots done): We are continuing to invest in improving our console experience. We have big plans for the future, but please bear-with us while we figure out how to deliver against the demands of so many customers ;) |
@adueck You're seeing some additional features that the Cygwin/MinGW team added to how they handle font-fallback. Alas, we cannot add this mechanism to the built-in Windows console this time around, but we have several items on our backlog to fix a number of the issues that prevent us from being able to support many globalization/localization issues, including emoji! |
@bitcrazed no I didn't sign up for the insider program. That's great to hear, actually. I'm looking forward to try it out. 🎉 (I'm not sure if it's on the table but, tabs would be so cool to have 😄) |
Tabs ... and MANY, MANY other features ;) |
@nolanlawson It only contains CBLC/CBDT color glyphs. It doesn't have any b&w regular glyphs which makes it an invalid font. FontForge can't work with it either, it's not just a Windows problem. :) My emoji fonts have SVGinOT color and b&w regular glyphs. They work fine on Windows, although only show color only in Firefox.
@yincrash has created a method to make my EmojiOne-based font replace the Windows default emoji: https://github.com/eosrei/emjione-color-font/pull/47 I doubt it will solve this issue, but could help. Happy to answer any other questions. |
Unfortunately, Windows 7 which is my and @amitmerchant1990's OS does not support Bash for Windows. Additionally, cmd.exe (which uses conhost.exe) doesn't really support Unicode. It uses code pages 😱 (and UCS-2 under the hood). This means you have to change the code page whenever you want something outside your current code page (437 for Americans), and switching to the "UTF-8" (65001) codepage doesn't really work well, plus it for sure does not support anything outside the BMP such as most Emoji. MSYS2 (and MINGW / Git Bash for Win) shell does support Unicode because they use Cygwin's mintty, so they aren't real Windows consoles (using conhost.exe), to normal windows (non-msys2/mingw packages), they are seen to apps like python and node as pipes and not as a console output, which is why interactive interpreters often fail in it. However, if you're using the MSYS2/MinGW version of python it does act like it's POSIX counterpart and outputs Emoji to the shell. I couldn't find a MSYS2 version of nodejs outside of 0.10.x version to test the Here's a screenshot of MSYS2 python displaying emoji when I set the console font to the B&W Noto Emoji. It doesn't seem that they use Window's fallback mechanisms for fonts, so you'd have to merge a nice console font with an emoji font using FontTools or some other tool to get emoji working nicely. tl;dr - windows console is a nightmare & regular windows nodejs will not display emoji to the console :( |
Thanks for the feedback. As the PM for Windows Console/ConHost and Bash experience, I appreciate your candor and can confirm that we are keenly aware of these and many other limitations that limit Console's value and cause frustration. Rest assured that we are working hard to fix things and I think that you'll see a lot of under the covers improvements in Win10AU, when you do upgrade (please consider doing so if you can; not only is the free upgrade offer expiring soon, but you're missing out on a lot of really great improvements that'll make your experience much better). |
Oh I understand why it's like that, and legacy support is one of the biggest reasons I love Windows. It's really awesome the WSL is being developed to help include the Linux ecosystem better. I don't think the Win32 API designers originally expected us to use code points outside of UCS-2 very much in the console, and I don't fault them for that. |
@yincrash Yeah, NT implemented Unicode support VERY early in its development and in many areas (e.g. Console) has not done a good job of keeping up to date with improvements like UTF-8. We're aiming to fix that in future releases :) |
I'm not a Windows user, but shouldn't this be fixed by now by the Windows "Terminal" that was released in 2019? Powershell should be able to display emoji too, I think. I would also suggest changing the readme so windows users don't think they can't use this. |
Nope. microsoft/terminal#190 |
@HLFH The issue you refer to is an issue in the legacy Windows Console, not the Windows Terminal. Windows Terminal is a new modern Terminal app in which we will implement all the features you and we want and need of a modern terminal app, including our new DirectX based text rendering engine that can display an ever increasing number of emoji and unicode glyphs: However, Windows Console & Cmd shell's primary job is to preserve backward compatibility with legacy scripts, apps, and tools. As such, we avoid changing Console (and especially Cmd) unless we have to. When we do have to make a change, we have to take enormous care not to break anything - and you wouldn't believe the things that break when we make the smallest change to Console/Cmd! This said, one of the key goals of implementing Terminal in native C++ was our ability to utilize and share code between Console and Terminal. We do have a goal of introducing Terminal's new text handling and text layout/rendering engines, along with the supporting technologies inc. our accessibility engine once sufficiently complete, stable, and performant enough. However, as you can imagine, this will take a little time. This said, we do intend to introduce Terminal's text layout and rendering engine to Console which will enable it to display emoji and most unicode glyphs. However, before we can do that, we have to do the hard work. Stay tuned. |
I'd really recommend avoiding cmd.exe as the main shell as a developer in 2020 though. Seriously, do yourself a favour and use a modern terminal emulator like the Windows Terminal, Powershell, hyper, etc... any of those. Don't expect Emoji support from a decades old application that just got Unicode support as recently as October 2018. Don't expect anything from it other than itself "just working". Because that's basically the only purpose of it today. |
Windows Terminal latest version works close enough without special fonts. Works even better with the correct fonts. |
@nnmrts A few clarifications:
Couldn't agree more - Windows developers should be using PowerShell these days 😜 https://twitter.com/bitcrazed/status/1387520440529080321?s=20&t=DQspE6JWijN3OJpjuJpKbg
Cmd and PowerShell are command-line shells and operate independently from the terminal used to command them. Windows Terminal (and the legacy Console/ConHost) are terminals. Many might find this series of blogs I wrote useful/interesting: https://devblogs.microsoft.com/commandline/windows-command-line-backgrounder/
Windows NT, upon which modern Windows is based, implemented 16-bit UCS-2 back in 1989 before there even was a Unicode standard, and long before UTF-8 was created.
As Charles points out, emoji works well on Windows Terminal 😁 |
I really like your npm !! :) |
I've tried to use it on Windows 7 and it appears to be not working correctly. All I can see is below
Node.js version
4.4.5
.The text was updated successfully, but these errors were encountered: