-
Notifications
You must be signed in to change notification settings - Fork 77
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
Multiple emoji encoding issues on Windows #67
Comments
Update: This seems to be caused by the current codepage not being 65001 (UTF-8). I'm leaving this issue open for 2 reasons:
|
Ran into this also, the |
Just verified now - setting the system locale to support UTF8 fixes it as well (as expected), but I'd still prefer rich to "just work" when using Windows Terminal. |
When trying to use
rich
to print files with emoji on Windows, there are some encoding issues.Below are 2 cases I encountered.
Garbled text instead of emoji
When running
rich broken-emoji.md
(broken-emoji.md - a text file with nothing but the 😊 emoji in it) on Windows (in Windows Terminal), I get the following:If I run
Get-Content broken-emoji.md
or runrich
inside WSL, I get the emoji printed as expected.Rich fails to print entirely
When running
rich cannot-print.md
(cannot-print.md - only contains the 🤝 emoji) on Windows, I get:Running it in WSL or using
Get-Content cannot-print.md
in the same terminal window gives me the emoji as expected.Expected Results
As this works in the same terminal both with Powershell's
Get-Content
, and when using WSL to runrich-cli
, I'd expect it to work in Windows as well.Environment
OS: Windows 10 (build 19044.1889)
Terminal: Windows Terminal (version 1.14.2281.0) running PowerShell
Rich CLI: 1.8.0
Python: 3.10.1
The text was updated successfully, but these errors were encountered: