okfn / messytables

Tools for parsing messy tabular data. This is now superseded by https://github.com/frictionlessdata/tabulator-py
http://messytables.readthedocs.io/
387 stars 110 forks source link

RowSet broken for unicode data: modified RowSet __repr__ to use %r instead of %s #55

Closed fawkesley closed 11 years ago

fawkesley commented 11 years ago

This is required to ensure repr escapes unicode characters as a string rather than returning a unicode object.

domoritz commented 11 years ago

@paulfurley Can you give an example which shows what this change fixes.

I don't get any errors with files that contain unicodes

import messytables

csv_file = open('simple.csv')
tables = messytables.CSVTableSet(csv_file).tables[0]
print repr(tables)
> python foo.py
RowSet(table)
fawkesley commented 11 years ago

@domoritz Good point about the test case, see dcf415e

domoritz commented 11 years ago

@paulfurley Can you make sure that the test are passing on python 2.6 as well?

See failures at https://travis-ci.org/okfn/messytables/jobs/7663559