Ticket #5877: patch-django-core-management-base_unicode_printing_#5877.patch

File patch-django-core-management-base_unicode_printing_#5877.patch, 798 bytes (added by anonymous, 17 years ago)
  • django/core/management/base.py

     
    11import os
    22import sys
     3import codecs
    34from optparse import make_option, OptionParser
    45
    56import django
     
    8889                    from django.db import connection
    8990                    if connection.ops.start_transaction_sql():
    9091                        print self.style.SQL_KEYWORD(connection.ops.start_transaction_sql())
    91                 print output
     92                scrout = codecs.getwriter('utf8')(sys.stdout)
     93                scrout.write(output)
    9294                if self.output_transaction:
    9395                    print self.style.SQL_KEYWORD("COMMIT;")
    9496        except CommandError, e:
Back to Top