I've added metaphone.py to a Django project; when I try to create a language file, I get the following error:
richard@gurgeh shared$ django-admin.py makemessages -a
processing language fr
Error: errors happened while running xgettext on metaphone.py
xgettext: ./metaphone.py:2: Unknown encoding "latin-1". Proceeding with ASCII instead.
xgettext: Non-ASCII string at ./metaphone.py:131.
Please specify the source encoding through --from-code or through a comment
as specified in http://www.python.org/peps/pep-0263.html.
However, I'm still uncertain as to whether this is a genuine problem with metaphone.py, or something due to my setup (OSX 10.6, Python 2.5 [Fink distribution], Django 1.1).
Whilst python recognises "latin-1" as a coding, xgettext doesn't - simply renaming it to iso-8859-1 fixes it (your solution of course works too, I'll just apply that :) )
I've added metaphone.py to a Django project; when I try to create a language file, I get the following error: richard@gurgeh shared$ django-admin.py makemessages -a processing language fr Error: errors happened while running xgettext on metaphone.py xgettext: ./metaphone.py:2: Unknown encoding "latin-1". Proceeding with ASCII instead. xgettext: Non-ASCII string at ./metaphone.py:131. Please specify the source encoding through --from-code or through a comment as specified in http://www.python.org/peps/pep-0263.html.
I've fixed the above errors and committed changes here: http://github.com/richardbarran/double-metaphone
However, I'm still uncertain as to whether this is a genuine problem with metaphone.py, or something due to my setup (OSX 10.6, Python 2.5 [Fink distribution], Django 1.1).