question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instructions to get emojis to work (on Windows)

See original GitHub issue

I am using Emojis for a project and everything worked perfectly fine on my machine. After distributing the self executable to the customer he reported me that the emojis didn’t get printed out and instead two question marks (??) are displayed. This was quite surprising because in the documentation there exists no section of when emojis get printed and when not.

So this is an effort of collecting solutions on how to get emojis to work on Windows.

  • Set the OutputEncoding manually: This is an easy fix to do, just add System.Console.OutputEncoding = System.Text.Encoding.UTF8 as the first line of the main function. Altough this is a quick fix I don’t think it is the best solution because basically you override the Encoding settings of the parent console.

  • Set the Encoding of the PowerShell (Core) console on a per session basis: You can set the input and output encoding of the console by executing the following line [console]::InputEncoding = [console]::OutputEncoding = [System.Text.Encoding]::UTF8 This commaand can be put in the profile file so the command gets executed automatically. There exists also an issue to set UTF-8 as the default encoding on PowerShell Core: https://github.com/PowerShell/PowerShell/issues/7233

  • Set the UTF-8 worldwide language support:

    • Execute intl.cpl
    • Go to [Administrative], then [Change system locale…] image
    • Set the checkbox image

In fact this was the setting I had set on my development machine which caused to render the emojis correctly.

I hope this helps troubleshooting the issues I had with the output encoding (and emojis) and maybe some explanation could be added to the documentation.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:12
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
patriksvenssoncommented, Mar 1, 2022

Documentation added in #744

4reactions
HolisticDevelopercommented, Dec 13, 2020

I found that this affected the display of the line graphics as well, and not just the emojis. For example, having looked at the Progress sample, I tried implementing my own, but I was confused when the line styles and spinners did not match up with the ones in the animations. Setting the output encoding to utf-8 and running in Windows Terminal improved things.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 Tip: Get started with the emoji keyboard shortcut
Did you know you've got an emoji keyboard at your fingertips right now with Windows 10? It's a keyboard shortcut – and it's...
Read more >
How to type emoji, kaomoji, and symbols using a hardware ...
Open any app (such as Notepad, Word, or Microsoft Edge). · In the text area, open the emoji panel using the "Windows key...
Read more >
How to Use Emojis in Windows 11 Using Keyboard Shortcuts
Open any text editor of your choice and position the cursor where you want to input the emojis. · Press Win + ....
Read more >
The Little-Known Keyboard Shortcut for Emojis on Mac and ...
How to use keyboard shortcuts for emojis · On Buffer: Add emojis with our emoji picker · For Mac keyboards: Use CTRL +...
Read more >
How to Use Emojis in Windows 10
Windows + Period or Windows + Semicolon will open the emoji panel. That was easy, right? You can find an emoji easily by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found