diff options
| author | Bartosz Grabski <bartosz.grabski@gmail.com> | 2018-05-27 14:09:54 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-06-11 21:34:13 -0400 |
| commit | 2bc014750adb093131f77e4c20bc17ba64b75cac (patch) | |
| tree | e132a7fff5191e6d719c7ad252af64a347867c57 /django | |
| parent | bc1435551c0cfaf4a22aff8216990b909005dba9 (diff) | |
Fixed #29452 -- Fixed makemessages setting charset of .pot files.
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/commands/makemessages.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py index a1e72c73ad..d0776488c3 100644 --- a/django/core/management/commands/makemessages.py +++ b/django/core/management/commands/makemessages.py @@ -182,8 +182,9 @@ def write_pot_file(potfile, msgs): found, header_read = False, False for line in pot_lines: if not found and not header_read: - found = True - line = line.replace('charset=CHARSET', 'charset=UTF-8') + if 'charset=CHARSET' in line: + found = True + line = line.replace('charset=CHARSET', 'charset=UTF-8') if not line and not found: header_read = True lines.append(line) |
