`makemessages` crashes when reading non-UTF8 encoded files.
|Reported by:||mrmachine||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a project with a 3rd party bundled file (MIT-license.txt) which is apparently not encoded with UTF-8 and contains some characters that makes the makemessages management command crash with a UnicodeDecodeError. It outputs the full contents of the file, but not the file name or location. Not very helpful.
I don't really want to have to search my project for 3rd party non-UTF8 files with a .txt or .html extension and convert them to UTF8. I'd rather leave 3rd party files as they are so I can diff and update them easier.
I also don't really want to do a find across the whole project looking for a match against the content that caused the error, so I can work out the filename and explicitly ignore it with a glob pattern.
I'd like Django to simply warn me that the file generated a UnicodeDecodeError and was skipped, then continue processing other files. If it's important, then I can go and fix it.
Change History (4)
comment:1 Changed 3 years ago by mrmachine
- Has patch set
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 3 years ago by claudep
- Severity changed from Normal to Release blocker
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 3 years ago by Claude Paroz <claude@…>
- Resolution set to fixed
- Status changed from new to closed