diff --git a/pytrustnfe/xml/filters.py b/pytrustnfe/xml/filters.py index f18e94b..a9ed689 100644 --- a/pytrustnfe/xml/filters.py +++ b/pytrustnfe/xml/filters.py @@ -24,6 +24,8 @@ def normalize_str(string): def strip_line_feed(string): if string: + if not isinstance(string, unicode): + string = unicode(string, 'utf-8', 'replace') remap = { ord(u'\t'): u' ', ord(u'\n'): u' ', diff --git a/setup.py b/setup.py index d3cf3a2..5efc48d 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # coding=utf-8 from setuptools import setup, find_packages -VERSION = "0.1.11" +VERSION = "0.1.12" setup( name="PyTrustNFe",