no ideas? I found a possible solution, but is this the best way? uc=self.edit.text() try: t=str(uc) except: try: t=unicode(self.edit.text()).encode("cp437") except: t="invalid char in string" Ingo