diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2012-09-20 10:29:21 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2012-09-20 10:29:21 +0200 |
commit | 922b08c9fc5e6bd1d442e6c4c801bf34c47dfa2f (patch) | |
tree | 192acc3f65631ec7fe18d3d816b72535a908ac32 | |
parent | 85ab556235a3b6da012ee731baf48830cb269765 (diff) | |
download | logilab-common-922b08c9fc5e6bd1d442e6c4c801bf34c47dfa2f.tar.gz |
[table] stop encoding to iso-8859-1, use unicode. Closes #105847
-rw-r--r-- | table.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) |