On Mon, 2007-10-08 at 06:43 +0530, Kenneth Gonsalves wrote:
[...]
> I could not give the full traceback as the problem occured on a  
> production server and after I did a hack to fix it, I could not find  
> the error message again. I have reproduced the problem. I am using  
> python 2.4 and revision 6365. To reprduce the error, create a model  
> with one field:
> 
> name = CharField of some some length and have
> __unicode__() = "%s"  %(self.name)
> 
> in admin enter a finnish word with special characters like: Asikainen  
> Päivi ja Jorma. On saving, or after saving, on trying to edit the  
> word I get this error:

Using this exact example and the test text you give, I cannot repeat
this error using either [6365] or current head ([6463]) with sqlite
(python2.3, 2.4 or 2.5), mysql or postgresql  -- python 2.5, only, in
both cases, since I'm not set up to test other Python versions with
those database on my laptop.

So more investigation is required on your end. Do the standard debugging
stuff: put in debugging prints to show the data that is being passed
into the template (in it's raw byte form -- maybe by putting debugging
into the truncatewords filter). Maybe have a look at the bytes your
browser is sending across the wire to see if it is sending the encoding
you expect. Check that you really are running a clean checkout and not
accidentally using any local modifications. Maybe print out the data
that is making it into HttpRequest.POST.

At this point, you need to work out why you are able to pass in data
that isn't correctly encoded. Encoding conversion happens when we create
the QueryDict (django/core/handlers/wsgi.py and modpython.py) and at the
database layer. Nowhere else. So somehow you are smuggling bad data
through one of those interfaces and it would be interesting to know how.

At the moment we don't have a test case that can be repeated by anybody
but you. And this is an area that is obviously exercised very regularly
by anybody using non-ASCII characters. I would expect to see a bug
report within about 10 seconds of committing something that broke it. So
that suggests there is something different at your end and you need to
try and figure out what that would be.

So keep hunting and do let us know if you find anything.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to