You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding .set_chars attribute with non-ASCII array seems to fail #17
I very much like this module, but I was hoping to use either code page 437 (standard for Windows command shell) or the Unicode equivalent for box drawing.
Example code:
importtexttableasttblmy_table=ttbl.Texttable()
# This causes a failure!cp_437_borders= ['─', '│', '┼', '═'] # Code Page 437 box drawing charactersmy_table.set_chars(cp_437_borders)
# returns: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)# This fails as well!cp_437_borders= ['─', '│', '┼', '═'] # Unicode box drawing charactersmy_table.set_chars(cp_437_borders)
# returns: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)# However, this would work:ascii_fun_borders= ['~', '/', 'X', '#']
my_table.set_chars(ascii_fun_borders)
I am relatively new to the Python world. I've tried changing the coding at the beginning of my module, but that doesn't seem to help. These are the two variants I tried:
Activity