STINNER Victor <victor.stin...@haypocalc.com> added the comment: + try: + with open(filename, 'rb') as fp: + encoding, _ = tokenize.detect_encoding(fp.readline) + except IOError: + encoding = None
You should use 'utf-8' instead of None (which will fall back to the locale encoding) here. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10342> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com