Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Colum width is wrong if emoji is used #52

Open
StShadow opened this issue Sep 19, 2017 · 5 comments
Open

Colum width is wrong if emoji is used #52

StShadow opened this issue Sep 19, 2017 · 5 comments

Comments

@StShadow
Copy link

StShadow commented Sep 19, 2017

Follow snippet draws a table with incorrect width for column with Unicode smile (for example 😵, dizzy face, Unicode: U+1F635, UTF-8: F0 9F 98 B5).

#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

if __name__ == '__main__':
    table_data = [['😵'], ['😵']]
    from terminaltables import SingleTable
    table = SingleTable(table_data)
    print table.table
@StShadow
Copy link
Author

Result:
screen shot 2017-09-19 at 16 16 23

@tadgh
Copy link

tadgh commented Feb 8, 2018

I also have this issue, would love to see it addressed at some point 👍

@10gic
Copy link

10gic commented Apr 7, 2018

@StShadow @tadgh There is a command line utility YATG, option --width1-chars=emoji can avoid this issue.

@johndavidsimmons
Copy link

johndavidsimmons commented Dec 15, 2018

Please address this issue. It would be greatly appreciated

@StShadow
Copy link
Author

StShadow commented Jan 30, 2019

Seems it works now

image

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.2
BuildVersion: 18C54

iTerm2 v3.2.5
Terminal v2.9.1 (421.1)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants