Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

2to3 ParseError with UTF-8 BOM

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


flashk at gmail

Nov 5, 2009, 1:00 PM

Post #1 of 4 (58 views)
Permalink
2to3 ParseError with UTF-8 BOM

I'm using Python 2.6.2 and when I run the 2to3 script on a file that
contains a UTF-8 BOM I get the following error:

RefactoringTool: Can't parse <filename>: ParseError: bad token:
type=55, value='\xef', context=('', (1, 0))

If I remove the BOM then it works fine. Is this expected behavior or a
bug in the 2to3 script?

-farshid
--
http://mail.python.org/mailman/listinfo/python-list


benjamin at python

Nov 5, 2009, 7:18 PM

Post #2 of 4 (50 views)
Permalink
Re: 2to3 ParseError with UTF-8 BOM [In reply to]

Farshid <flashk <at> gmail.com> writes:
> If I remove the BOM then it works fine. Is this expected behavior or a
> bug in the 2to3 script?

Try the 2to3 distributed in Python 3.1.




--
http://mail.python.org/mailman/listinfo/python-list


flashk at gmail

Nov 6, 2009, 9:12 AM

Post #3 of 4 (46 views)
Permalink
Re: 2to3 ParseError with UTF-8 BOM [In reply to]

On Nov 5, 7:18 pm, Benjamin Peterson <benja...@python.org> wrote:

> Try the 2to3 distributed in Python 3.1.

I get the same error with the 2to3 script in Python 3.1

-farshid
--
http://mail.python.org/mailman/listinfo/python-list


gagsl-py2 at yahoo

Nov 13, 2009, 4:04 AM

Post #4 of 4 (18 views)
Permalink
Re: 2to3 ParseError with UTF-8 BOM [In reply to]

En Fri, 06 Nov 2009 14:12:57 -0300, Farshid <flashk[at]gmail.com> escribiķ:
> On Nov 5, 7:18 pm, Benjamin Peterson <benja...@python.org> wrote:
>
>> Try the 2to3 distributed in Python 3.1.
>
> I get the same error with the 2to3 script in Python 3.1

Reported as http://bugs.python.org/issue7313

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.