Hi, I'm translating an application from French to English and everything was going smoothly until I began work on a particular form. The code looks like this:
# -*- coding: utf-8 -*- from django import newforms as forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from apparto.building import models class BuildingForm(forms.Form): #~ contact = forms.ChoiceField() civic_number = forms.IntegerField(label=_('Numéro')) # Other fields omitted... When I navigate to this form, I get the following: DjangoUnicodeDecodeError at /apparto/account/addbuilding/ 'ascii' codec can't decode byte 0xe9 in position 3: ordinal not in range(128). You passed in <django.utils.functional.__proxy__ object at 0x0180D170> (<class 'django.utils.functional.__proxy__'>) Request Method: GET Request URL: http://127.0.0.1/apparto/account/addbuilding/ Exception Type: DjangoUnicodeDecodeError Exception Value: 'ascii' codec can't decode byte 0xe9 in position 3: ordinal not in range(128). You passed in <django.utils.functional.__proxy__ object at 0x0180D170> (<class 'django.utils.functional.__proxy__'>) Exception Location: C:\Python25\Lib\site-packages\django\django\utils \encoding.py in force_unicode, line 60 Python Executable: C:\Python25\python.exe Python Version: 2.5.1 Unicode error hint The string that could not be encoded/decoded was: Num?ro I made sure all my templates had {% load i18n %} I tried to reverse the French and English strings in the .po file and recompiled: no error when I switch languages. Did I simply forget something obvious? I'm a Django noob, any help would be appreciated, -G- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---