Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   2to3 ParseError with UTF-8 BOM (http://www.velocityreviews.com/forums/t704329-2to3-parseerror-with-utf-8-bom.html)

Farshid 11-05-2009 09:00 PM

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

Benjamin Peterson 11-06-2009 03:18 AM

Re: 2to3 ParseError with UTF-8 BOM
 
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.





Farshid 11-06-2009 05:12 PM

Re: 2to3 ParseError with UTF-8 BOM
 
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

Gabriel Genellina 11-13-2009 12:04 PM

Re: 2to3 ParseError with UTF-8 BOM
 
En Fri, 06 Nov 2009 14:12:57 -0300, Farshid <flashk@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



All times are GMT. The time now is 05:19 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.