#12849: django's development server raises an encoding exception when trying to
colorize non-ascii text
------------------------------------------------+---------------------------
          Reporter:  jype                       |         Owner:  nobody
            Status:  new                        |     Milestone:  1.2   
         Component:  django-admin.py runserver  |       Version:  SVN   
        Resolution:                             |      Keywords:        
             Stage:  Accepted                   |     Has_patch:  1     
        Needs_docs:  0                          |   Needs_tests:  0     
Needs_better_patch:  0                          |  
------------------------------------------------+---------------------------
Comment (by russellm):

 I agree that the encoding-guessing is bad -- plus, on at least one of my
 test boxes (an Ubuntu virtual server on RackSpace), it doesn't work. On my
 test box, the preferred encoding is "ANSI_X3.4-1968", which is the same as
 'ascii'; attempting to encoding a unicode string as ascii will fail on any
 exotic characters.

 Just outputting unicode strings isn't an option; sys.stdout.write() needs
 to take a byte string. Calling smart_str() to encode strings is about as
 good as we're going to get here.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12849#comment:11>
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