Index: b/bin/pyflakes
===================================================================
--- a/bin/pyflakes
+++ b/bin/pyflakes
@@ -24,6 +24,9 @@
         print >> sys.stderr, line
         print >> sys.stderr, " " * (offset-2), "^"
         status = 2
+    except UnicodeError, msg:
+        print >> sys.stderr, 'encoding error at %r: %s' % (filename, msg)
+        status = 2
     else:
         w = checker.Checker(tree, filename)
         w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
