Open Popolon opened 2 years ago
Emoji/UTFmultibyte in the terminal is a huge can of worms, this issue has been with asciinema for a long time now.
asciinema plays them perfectly in term at least. On this asciideo (if I can say), I looks like only emoji are not at a good place, and shift in some cases other 2bytes UTF8 chars.
In your term. Try another one :)
Tried with several terminals, xfce4-term, terminator, lxterminal, xterm & uxterm (these two don't manage emoji font , and display squares inside, but still well formated), weston-terminal in weston displayed in an X11 windows (only squares, but well formated too), all worked fine at playing asccinema of this emoji+hanzi chars record. I made it caruflly with ncurses to have good term output.
Also tried on remote host with different architecture (ARM, RISC-V (both real hw and qemu)) via ssh, works fine too.
Indeed asciinema-player doesn't support double-width characters (which includes many emojis) at the moment. It's a known limitation. Hopefully we'll address it at some point although it's not a high priority issue.
How I wish it could be restored
The recently released 3.7.1 version of the player got several improvements around rendering accuracy, mostly fixing positioning and alignment of various character groups (ascii drawing, block elements, Powerline symbols, CJK, emoji). It should look much better than before now.
The recording linked by @Popolon looks like this for me:
Is this more or less how it should look?
There are still the same problem as soon the characters move sadly. You will see for exemple the character 森 (forest) in green that appear at some random position when the wolf head emoji character move inside the forest, or the right bar with a test reference with existing bg used characters that move after few second, but they are fix in a term, asciinema work fine in term.
You can compare the terminal and web version to see the differences.
Got it, thanks for the clarification :+1:
Are you interested in fixing this issue?Not supporting multi byte text is a major bug.
@BinaryRyan What is specifically not working well for you? There's been some improvements to this in recent releases. Care to link to a demo that demonstrates the issue you're having?
well,we need to support internationalization in our project including chinese characters.
Actually, it's continuous. when I press 'backspace' terminal is inaccurate.
This record works perfectly in terminal, but not in browser (emoji made moving characters are not drawn at their place): https://asciinema.org/a/461817
This is based on an interactive C program using ncrses with several view + UTF (multibytes) characters including chinese (uniHan) + emoji characters.
Source code is available here: https://framagit.org/popolon/emohanjeu