Message196435
lib2to3.pgen2.tokenize:detect_encoding looks for the regex "coding[:=]\s*([-\w.]+)" in the first two lines of the file without first checking if they are comment lines.
You can get 2to3 to fail with "SyntaxError: unknown encoding: 0" with a single line file:
coding=0
A simple fix would be to check that the line is a comment before trying to look up the encoding from that line. |
|
Date |
User |
Action |
Args |
2013-08-28 23:50:28 | Paul.Bonser | set | recipients:
+ Paul.Bonser |
2013-08-28 23:50:28 | Paul.Bonser | set | messageid: <1377733828.84.0.187873686894.issue18873@psf.upfronthosting.co.za> |
2013-08-28 23:50:28 | Paul.Bonser | link | issue18873 messages |
2013-08-28 23:50:28 | Paul.Bonser | create | |
|