On 3-Oct-06, at 6:56 PM, Malcolm Tredinnick wrote:

> 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).

Hi Malcolm,

A repr() of 'Djangé' (from browser input) is 'Djang\xc3\xa9'.

I've checked that everything is set to UTF-8 (database defaults,  
database tables, charset, html meta, django default). Should I  
be .encode('utf8') any string I pass around, or am I doing something  
else wrong?

Thanks!
Beau


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to