Index: thuban/Thuban/UI/view.py =================================================================== --- thuban/Thuban/UI/view.py (révision 2709) +++ thuban/Thuban/UI/view.py (copie de travail) @@ -425,7 +425,7 @@ dc = wx.ClientDC(self) font = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL) dc.SetFont(font) - return dc.GetTextExtent(text) + return dc.GetTextExtent(text.decode('iso-8859-1')) def LabelShapeAt(self, x, y, text=None): """Add or remove a label at window position x, y. Index: thuban/Thuban/UI/baserenderer.py =================================================================== --- thuban/Thuban/UI/baserenderer.py (révision 2709) +++ thuban/Thuban/UI/baserenderer.py (copie de travail) @@ -583,7 +583,7 @@ x, y = forward(x, y) x = int(round(x * scale + offx)) y = int(round(-y * scale + offy)) - width, height = self.dc.GetTextExtent(text) + width, height = self.dc.GetTextExtent(text.decode('iso-8859-1')) if label.halign == ALIGN_LEFT: # nothing to be done pass @@ -598,4 +598,4 @@ y = y - height elif label.valign == ALIGN_CENTER: y = y - height/2 - self.dc.DrawText(text, x, y) + self.dc.DrawText(text.decode('iso-8859-1'), x, y) Index: thuban/Thuban/UI/controls.py =================================================================== --- thuban/Thuban/UI/controls.py (révision 2709) +++ thuban/Thuban/UI/controls.py (copie de travail) @@ -51,7 +51,7 @@ name = names[i] value = record[name] self.InsertStringItem(i, name) - self.SetStringItem(i, 1, str(value)) + self.SetStringItem(i, 1, str(value).decode('iso-8859-1')) values[i] = value self.values = values Index: thuban/Thuban/UI/tableview.py =================================================================== --- thuban/Thuban/UI/tableview.py (révision 2709) +++ thuban/Thuban/UI/tableview.py (copie de travail) @@ -71,7 +71,16 @@ # Renderer understands the type too,) not just strings as in the # C++ version. def GetValue(self, row, col): - record = self.table.ReadRowAsDict(row, row_is_ordinal = 1) + try: + record = self.table.ReadRowAsDict(row, row_is_ordinal = 1) + except UnicodeError: + record = dict() + for (key, val) in self.table.ReadRowAsDict(row, \ + row_is_ordinal = 1).items(): + if isinstance(val, str): + record[key] = val.decode('iso-8859-1') + else: + record[key] = val return record[self.columns[col][0]] def SetValue(self, row, col, value):