Closed DragonRulerX closed 3 years ago
Bump. Can confirm this issue in 0.8.7
This issue has been fixed in the current master branch. See also: pull request #58.
I'm not convinced this was fixed. I just pulled 0.8.9 and tried it and my results were still like my original post. I'm not sure if this is a terminal/editor issue or not, but ultimately Discord still doesn't render it properly, but PowerShell does.
I am hitting this issue with the latest version with emojis, specifically ๐ชฆ, ๐ and โ .
To have this fixed you need to install widechars
:
https://github.com/astanin/python-tabulate#wide-fullwidth-cjk-symbols
Emoji modifiers still cause misalignment
+------+---------------------------------+------------------+
| S.NO | Name | Owner |
+------+---------------------------------+------------------+
| 1 | ๐จโ๐ป | S B |
| 2 | ๐จโ๐ป | saku |
| 3 | ๐จโ๐ป | Pranav |
| 4 | mรบsica para programar ๐จโ๐ป | midudev |
| 5 | ๐จโ๐ป๐๐ธโค๏ธ | waterfall7529 |
| 6 | ๐จโ๐๐จโ๐ป | Riko Akami |
| 7 | ๐ทโโ๏ธ๐จโ๐ป๐จโ๐ผ | naru |
| 8 | ใใฌใฏใผใฏ BGM๐จโ๐ปBoom Bap / Jazz | CHELSEA Records |
| 9 | ๐ฅ๐จโ๐ป๐๏ธโโ๏ธ | shoma ishida |
| 10 | ๐๐โ๏ธ๐จโ๐ป | REN |
+------+---------------------------------+------------------+
I got the same emoji problem, maybe its related to the terminal font also, I use Sarasa Mono TC
font as a work around
I've found an issue with representing certain Unicode symbols in tabulate and I'm not sure if this is already known given the other two issues seemingly pointing out a similar issue, but not using emoji's in their claims: https://github.com/astanin/python-tabulate/issues/52 https://github.com/astanin/python-tabulate/issues/28
I'm pretty new to using GitHub so please excuse the use of pictures instead of the raw data. I couldn't figure out how to format it so that it wouldn't remove the white space which is the primary point of concern.
Editor Sublime Text3: Image shows logged table in text file
Discord: Image shows code blocked table
PowerShell: Image shows logged table in PowerShell (just as reference since my terminal is not Unicode aware, but then things line up)
This is the raw data: usersid | name | active -----------+---------------+---------- 26 | โ ๐๐ง๐ ๐ โ๐ โ | True 34 | ๐ข๐ฎ๐ฝ๐ฑ๐น | True 32 | ๐๐ช๐ป๐ด ๐๐ฏ๐ฏ๐ฎ๐ฌ๐ฝ๐ | True 1 | Dragon | True