#12302: Exception with utf8 message leads to DjangoUnicodeDecodeError
------------------------------------+---------------------------------------
          Reporter:  bjourne        |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  Uncategorized  |       Version:  1.1   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by wdoekes):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Hmyes.. I've tested this on my debian/lenny install and can confirm this.

 psycopg2 uses the client_encoding (as set through
 self.connection.set_client_encoding('UTF8') in
 django/db/backends/postgresql_psycopg2/base.py) for its error messages.

 Thus, to get this fixed, all DatabaseErrors raised by psycopg2 should have
 their .message.decode('utf-8')'d before they're exposed to the world.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12302#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en.


Reply via email to