python-texttable icon indicating copy to clipboard operation
python-texttable copied to clipboard

Do not work with unicode rows.

Open Wasapl opened this issue 13 years ago • 1 comments

ActivePython 2.7.2.5 (ActiveState Software Inc.) based on Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

row = (u'Вася',u'Пупкин') import texttable t = texttable.Texttable() t.add_row(row) Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\texttable-0.8.1-py2.7.egg\texttable.py", line 300, in add_row cells.append(self._str(i,x)) File "C:\Python27\lib\site-packages\texttable-0.8.1-py2.7.egg\texttable.py", line 359, in _str return str(x) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

Wasapl avatar Dec 07 '12 12:12 Wasapl

+1

fropert avatar Jul 19 '13 14:07 fropert