Serhiy Storchaka added the comment: If NONASCII is None I suggest the followed fallback code
for i in range(0x80, 0xFFFF): character = chr(i) if character.isprintable(): try: if os.fsdecode(os.fsencode(character)) == character: NONASCII = character break except UnicodeError: pass ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16414> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com