#26731: UnicodeDecodeError when writing unicode to stdout of management command
-------------------------------+--------------------------------------
     Reporter:  dhobbs         |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Uncategorized  |                  Version:  1.8
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by timgraham):

 I'm using this management command:
 {{{
 # -*- coding: utf-8 -*-
 from django.core.management.base import BaseCommand

 from polls.models import Question

 class Command(BaseCommand):

     def handle(self, *args, **options):
         v = 'Output: %s'.format(Question.objects.latest('id'))
         print(type(v))
         print(v)
         self.stdout.write(v)
 }}}
 with a question with some non-ASCII chars in the name.

--
Ticket URL: <https://code.djangoproject.com/ticket/26731#comment:12>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.e155151f6db88b2ff88c40d62b7d67c3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to