#22686 closed Bug (fixed)
makemessages crashes with unicode filename and verbose > 1
| Reported by: | Arthur Koziel | Owned by: | nobody |
|---|---|---|---|
| Component: | Internationalization | Version: | 1.6 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Running makemessages with a verbose level of >1 crashes with a UnicodeDecodeError when using a filename with unicode chars in it.
Steps to reproduce:
- Create file with unicode chars in it (e.g. "200x200-åäöåäöåäöåäö.png")
- Run "makemessages -v2"
Result: "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)"
Expected: Command should skip file and print "UnicodeDecodeError: skipped file %s in %s" to stdout
Change History (4)
comment:1 by , 11 years ago
| Component: | Uncategorized → Internationalization |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Bug |
comment:2 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I can reproduce. Passing unicode to
os.walkshould solve the issue. However, I'm not very comfortable adding non-ascii file names in the Django tree to test that issue.