Closed frabcus closed 12 years ago
If I use UTF-8 characters as a key:
https://gist.github.com/2489849
Then I get this error:
Traceback (most recent call last): File "./test.py", line 7, in dt.insert({"name": "Super Digger", "payload": 10, "英国": "yes"}) File "/Library/Python/2.7/site-packages/dumptruck/dumptruck.py", line 199, in insert self.create_table(data, table_name) File "/Library/Python/2.7/site-packages/dumptruck/dumptruck.py", line 186, in create_table );""" % (quote(table_name), quote(k), get_column_type(startdata[k])), commit = False) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 47: ordinal not in range(128)
It should probably just work. Failing that, it should give a more useful error.
Likewise, other unicode everywhere.
It works a little bit better now; now it just returns in the wrong format.
This is fixed. I haven't uploaded a new version to PyPI though.
If I use UTF-8 characters as a key:
https://gist.github.com/2489849
Then I get this error:
Traceback (most recent call last): File "./test.py", line 7, in
dt.insert({"name": "Super Digger", "payload": 10, "英国": "yes"})
File "/Library/Python/2.7/site-packages/dumptruck/dumptruck.py", line 199, in insert
self.create_table(data, table_name)
File "/Library/Python/2.7/site-packages/dumptruck/dumptruck.py", line 186, in create_table
);""" % (quote(table_name), quote(k), get_column_type(startdata[k])), commit = False)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 47: ordinal not in range(128)
It should probably just work. Failing that, it should give a more useful error.
Likewise, other unicode everywhere.