def normalize_text(self, txt):
<EOL>if self.unifontsubset and isinstance(txt, str) and not PY3K:<EOL><INDENT>txt = txt.decode('<STR_LIT:utf8>')<EOL><DEDENT>elif not self.unifontsubset and isinstance(txt, unicode) and not PY3K:<EOL><INDENT>txt = txt.encode('<STR_LIT>')<EOL><DEDENT>return txt<EOL>
Check that text input is in the correct format/encoding