-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
⚡ is a wide symbol #100
Comments
Is it in a console or in a browser? I mean the screenshot |
In a terminal emulator.
Also from http://unicode.org/Public/emoji/4.0/emoji-data.txt: |
Yes, you are right, that is a bug and it should be fixed. Thank you for reporting! |
What location is that? |
Strange enough but it works in the browser |
Maybe because the browser is built with old Unicode data and defaults to width 1. UPD: I think terminal emulator uses |
Please note that the built-in png output is also wrong, http://wttr.in/Budapest.png?lang=en currently generates: |
@DirtYiCE @BerserkerTroll @MAGICCC @cig0 @slump64 Place where the everlasting thunder: curl wttr.in/:test-thunder |
@slump64 So it is still broken in @slump64 's Chrome, but it works fine in one my firefoxes as far as I can see (but not in all of them). I'm curios what about other browsers |
Hey @chubin,
|
It's a little weird - as it is always, when it comes to character encoding. It seems that the "string lengths" of the emojis are determined in wttr.py:137. A quick test in Python (combining lines 137, 50 and 48):
I'm not familiar with Python, but this seems to be wrong. But, as usual, we're not alone: https://stackoverflow.com/questions/42783173/getting-proper-length-of-emojis (And in PHP, the suggestion is to use utf-16le to deterrmine the string length of emojis, |
you should do your next project in Golang if you want to work with unicode for sure |
@chubin ok in mate-terminal (version 1.20), but Firefox thinks that it is a narrow character. |
The text was updated successfully, but these errors were encountered: