[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2009-05-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r72491. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2660 ___

[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2009-05-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch using tokenize.detect_encoding() to read the encoding of Python scripts instead of using default io.open() encoding (utf-8). We might write unit test. See also related issue: #5093 -- keywords: +patch nosy: +haypo

[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2009-04-26 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Confirmed in py3k on rev71995. -- components: +2to3 (2.x to 3.0 conversion tool) nosy: +ajaksu2, benjamin.peterson stage: - test needed type: - behavior versions: +Python 2.6, Python 3.1 -Python 3.0

[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2009-04-26 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: The problem is that 2to3 just reads the file with whatever locale.getpreferredencoding() returns. It should use tokenize.detect_encoding() to discover the correct encoding to open it with. --

[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2008-04-19 Thread Collin Winter
Changes by Collin Winter [EMAIL PROTECTED]: -- title: 2to3 throws a utf8 decode error on a iso-8859-1 string - Py3k fails to parse a file with an iso-8859-1 string __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2660

[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2008-04-19 Thread Brandon Ehle
Brandon Ehle [EMAIL PROTECTED] added the comment: Someone on the #python IRC channel suggested that the default for python 3.0 for unicode string literals is reversed from python 2.5. If you remove the unicode string literal (u'') from the front of the string, it runs fine under python 3.0 and

[issue2660] Py3k fails to parse a file with an iso-8859-1 string

2008-04-19 Thread Brandon Ehle
Brandon Ehle [EMAIL PROTECTED] added the comment: Also, I can confirm that running 2to3 with Python 2.6 correctly converts the script but running 2to3 with Python 3.0 results in a UnicodeDecodeError exception. __ Tracker [EMAIL PROTECTED]