On Tue, 2006-10-03 at 08:15 -0700, Beau Hartshorne wrote:
> On database updates, utf-8 strings like ’ raise an UnicodeDecodeError
> exception on line 19 of util.py (version 0.9.5). I can get around
> this by commenting out this code in util.py, but is there something
> else I could do?
>
> self.db.queries.append({
> 'sql': sql % tuple(params),
> 'time': "%.3f" % (stop - start),
> })
This probably isn't going to solve your problem, but it might help track
down what is really happening...
UnicodeDecodeError usually means that you are trying to use unicode
strings that haven't been converted to UTF-8 when they needed to be.
Django mostly "just works" if you pass around UTF-8 strings as strings
of bytes. It doesn't work entirely with native unicode objects
internally.
So, I would check that you are really using UTF-8 bytes at that point.
Could you maybe post the contents of "sql" and "params" when you get the
above error (post "params" in repr() format, not as a printed string,
since it's important to see the encoding, not just the output
character).
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
-~----------~----~----~----~------~----~------~--~---