98 | | #nbfields = len(entries[0]) |
99 | | #for i in range(1, len(entries)) : |
100 | | # fields = list(entries[i]) |
101 | | # for j in range(nbfields) : |
102 | | # field = fields[j] |
103 | | # if type(field) == StringType : |
104 | | # try : |
105 | | # fields[j] = field.decode("UTF-8").encode(self.tool.getCharset()) |
106 | | # except UnicodeEncodeError : # takes care of old jobs in history not stored as UTF-8 |
107 | | # pass |
108 | | # entries[i] = tuple(fields) |
| 101 | nbfields = len(entries[0]) |
| 102 | for i in range(1, len(entries)) : |
| 103 | fields = list(entries[i]) |
| 104 | for j in range(nbfields) : |
| 105 | field = fields[j] |
| 106 | if type(field) == StringType : |
| 107 | try : |
| 108 | fields[j] = field.decode("UTF-8").encode(self.tool.getCharset()) |
| 109 | except UnicodeEncodeError : # takes care of old jobs in history not stored as UTF-8 |
| 110 | pass |
| 111 | entries[i] = tuple(fields) |