--- a/eric6/Globals/__init__.py Sat Aug 31 12:29:57 2019 +0200 +++ b/eric6/Globals/__init__.py Sat Aug 31 12:58:11 2019 +0200 @@ -12,10 +12,6 @@ # from __future__ import unicode_literals -try: - str = unicode # __IGNORE_EXCEPTION__ -except NameError: - pass import sys import os @@ -425,12 +421,8 @@ @return converted QByteArray @rtype QByteArray """ - if sys.version_info[0] == 2: - if isinstance(txt, unicode): # __IGNORE_WARNING__ - txt = txt.encode("utf-8") - else: - if isinstance(txt, str): - txt = txt.encode("utf-8") + if isinstance(txt, str): + txt = txt.encode("utf-8") return QByteArray(txt)