﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29452	makemessages command doesn't set .pot file charset properly	Bartosz Grabski	Bartosz Grabski	"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."	Bug	closed	Internationalization	1.11	Normal	fixed			Accepted	1	0	0	1	0	0
