2to3 ParseError with UTF-8 BOM

F

Farshid

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
 
B

Benjamin Peterson

Farshid said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,037
Messages
2,570,371
Members
47,014
Latest member
TashaMorei

Latest Threads

Top