diff options
| author | Iuri de Silvio <iurisilvio@gmail.com> | 2014-04-19 14:51:06 -0300 |
|---|---|---|
| committer | Iuri de Silvio <iurisilvio@gmail.com> | 2014-04-19 14:51:06 -0300 |
| commit | d40cdfbcd0ca4fd45b261fe7788d8211d85b70eb (patch) | |
| tree | 6ac84b2e262ecd7bb363b167bf44c32400d821c1 /tablib/formats/_html.py | |
| parent | 86bbaf9beaf722822567f37be1f2300556d9901d (diff) | |
| parent | 0ed01d85b965bd814cecb3eb33042dd59d8ebb1c (diff) | |
| download | tablib-d40cdfbcd0ca4fd45b261fe7788d8211d85b70eb.tar.gz | |
Merge pull request #146 from kennethreitz/fix/unicode_append
Fix test_unicode_append
Diffstat (limited to 'tablib/formats/_html.py')
| -rw-r--r-- | tablib/formats/_html.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tablib/formats/_html.py b/tablib/formats/_html.py index c516e31..7bb77f0 100644 --- a/tablib/formats/_html.py +++ b/tablib/formats/_html.py @@ -5,15 +5,15 @@ import sys - if sys.version_info[0] > 2: - from io import StringIO + from io import BytesIO as StringIO from tablib.packages import markup3 as markup else: from cStringIO import StringIO from tablib.packages import markup import tablib +from tablib.compat import unicode import codecs BOOK_ENDINGS = 'h3' @@ -50,7 +50,7 @@ def export_set(dataset): wrapper = codecs.getwriter("utf8")(stream) wrapper.writelines(unicode(page)) - return stream.getvalue() + return stream.getvalue().decode('utf-8') def export_book(databook): |
