2to3 ParseError with UTF-8 BOM

Farshid flashk at gmail.com
Thu Nov 5 16:00:17 EST 2009


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



More information about the Python-list mailing list