diff --git a/fbtest.py b/fbtest.py index 9ab6053..b7a4665 100755 --- a/fbtest.py +++ b/fbtest.py @@ -1904,8 +1904,8 @@ def __init__(self): def _quoteattr(self, attr): """Escape an XML attribute. Value can be unicode.""" attr = xml_safe(attr) - if isinstance(attr, unicode) and not UNICODE_STRINGS: - attr = attr.encode(self.encoding) + if isinstance(attr, types.UnicodeType): + attr = attr.encode('utf-8') return saxutils.quoteattr(attr) def clear(self): """Remove all results."""