Cannot handle non-ascii strings in source code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pocket-lint |
Fix Released
|
High
|
Henning Eggers |
Bug Description
Pocket-lint trips over source files with non-ascii characters in it. The example contained "português". It probably needs to honor PEP 0263.
Traceback (most recent call last):
File "/usr/bin/
sys.
File "/usr/lib/
check_
File "/usr/lib/
checker.check()
File "/usr/lib/
PythonCheck
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
ascii_line = line.encode(
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 29: ordinal not in range(128)
Related branches
- Curtis Hovey: Pending requested
-
Diff: 94 lines (+37/-8)2 files modifiedpocketlint/formatcheck.py (+10/-5)
pocketlint/tests/test_python.py (+27/-3)
Changed in pocket-lint: | |
status: | Incomplete → In Progress |
assignee: | nobody → Henning Eggers (henninge) |
Changed in pocket-lint: | |
milestone: | none → 0.5.16 |
importance: | Undecided → High |
status: | In Progress → Fix Committed |
Changed in pocket-lint: | |
status: | Fix Committed → Fix Released |
which kind of source file? The Python checker does do an encoding check...ascii, or the encoding specified at the start of the file? This rule also applies to doctests.