You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.
I am using tablefu + jinja2 to create html forms from an excel spreadsheet. Excel 2013 will export csv with 8bit ASCII, Latin-1, which allows for translations into European languages.
Tablefu is based on the csv reader that does not natively support >128 ASCII or unicode, and jinja only wants unicode, so I get UnicodeEncodeError.
However the help page http://docs.python.org/2/library/csv.html#examples does have an implemention for unicode.
I pasted the example generator into init.py and added an "encoding" option, to replace reader = unicode_csv_reader, replaced open with codecs.open, et voilà, my tables and html can contain Latin-1.
The text was updated successfully, but these errors were encountered:
I am using tablefu + jinja2 to create html forms from an excel spreadsheet. Excel 2013 will export csv with 8bit ASCII, Latin-1, which allows for translations into European languages.
Tablefu is based on the csv reader that does not natively support >128 ASCII or unicode, and jinja only wants unicode, so I get UnicodeEncodeError.
However the help page http://docs.python.org/2/library/csv.html#examples does have an implemention for unicode.
I pasted the example generator into init.py and added an "encoding" option, to replace reader = unicode_csv_reader, replaced open with codecs.open, et voilà, my tables and html can contain Latin-1.
The text was updated successfully, but these errors were encountered: