summaryrefslogtreecommitdiff
path: root/table.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2012-09-20 10:29:21 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2012-09-20 10:29:21 +0200
commit922b08c9fc5e6bd1d442e6c4c801bf34c47dfa2f (patch)
tree192acc3f65631ec7fe18d3d816b72535a908ac32 /table.py
parent85ab556235a3b6da012ee731baf48830cb269765 (diff)
downloadlogilab-common-922b08c9fc5e6bd1d442e6c4c801bf34c47dfa2f.tar.gz
[table] stop encoding to iso-8859-1, use unicode. Closes #105847
Diffstat (limited to 'table.py')
-rw-r--r--table.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/table.py b/table.py
index 744bb78..5fdc148 100644
--- a/table.py
+++ b/table.py
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
@@ -440,7 +440,7 @@ class Table(object):
# The first cell <=> an empty one
col_names_line = [' '*col_start]
for col_name in self.col_names:
- col_names_line.append(col_name.encode('iso-8859-1') + ' '*5)
+ col_names_line.append(col_name + ' '*5)
lines.append('|' + '|'.join(col_names_line) + '|')
max_line_length = len(lines[0])
@@ -448,7 +448,7 @@ class Table(object):
for row_index, row in enumerate(self.data):
line = []
# First, build the row_name's cell
- row_name = self.row_names[row_index].encode('iso-8859-1')
+ row_name = self.row_names[row_index]
line.append(row_name + ' '*(col_start-len(row_name)))
# Then, build all the table's cell for this line.
@@ -743,14 +743,14 @@ class TableCellRenderer:
def render_row_cell(self, row_name, table, table_style):
"""Renders the cell for 'row_id' row
"""
- cell_value = row_name.encode('iso-8859-1')
+ cell_value = row_name
return self._render_cell_content(cell_value, table_style, 0)
def render_col_cell(self, col_name, table, table_style):
"""Renders the cell for 'col_id' row
"""
- cell_value = col_name.encode('iso-8859-1')
+ cell_value = col_name
col_index = table.col_names.index(col_name)
return self._render_cell_content(cell_value, table_style, col_index +1)