#29452: makemessages command doesn't set .pot file charset properly
------------------------------------------------+------------------------
Reporter: Bartosz Grabski | Owner: nobody
Type: Uncategorized | Status: new
Component: Internationalization | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
When running `python manage.py makemessages`, I'm getting the following
error:
{{{
CommandError: errors happened while running msguniq
C:\dev\xxx\locale\django.pot:2738: C:\dev\xxx\locale\django.pot: input is
not valid in "ASCII" encoding
}}}
This is because some of my translatable strings contain non-ASCII
characters. I've checked the code in `makemessages.py` and found the
culprit:
{{{
for line in pot_lines:
if not found and not header_read:
found = True
line = line.replace('charset=CHARSET', 'charset=UTF-8')
if not line and not found:
header_read = True
lines.append(line)
}}}
Since `found` is set to `True` on the first iteration, charset is never
updated as it's usually on line 17.
--
Ticket URL: <https://code.djangoproject.com/ticket/29452>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/057.35bf7f34dd47d2f773a8dbe2423b031f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.