Hello, I am using the provided localization by Django. I wanted to use gettext with some of my javascript files and thus enabled the JavaScriptCatalog and executed this command:
python manage.py makemessages -d djangojs -l de However, this results in a UnicodeDecodeError, ultimately caused by popen_wrapper in core/management/utils.py. I already spent a little time on debugging and found that this is called from is_templatized in makemessages.py, which tries to check the installed xgettext version. If I simply omit this check by always returning True there, makemessages succeeds and it also finds the correct messages in my JavaScript files. The exact error raised is: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa9 in position 49: invalid start byte Also, DEFAULT_LOCALE_ENCODING is set to cp65001. When manually calling run from python with the arguments like in popen_wrapper, the invalid byte (0xa9) is clearly visible: "xgettext (GNU gettext-tools) 0.19.8.1\r\nCopyright \xa9 1995-1998, ..." Am I missing something? I am using Django version 4.0.3, Windows version 21H1, Python 3.10.3 (with Miniconda). Any help would be appreciated. Kind regards, Benedikt Karl -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/effccba4-8908-4395-a4fb-db6a59003248n%40googlegroups.com.