﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26731	UnicodeDecodeError when writing unicode to stdout of management command	Darren Hobbs	nobody	"In a management command in Python 2.7, if you include unicode characters when writing to stdout (with self.stdout.write) you will get a UnicodeDecodeError

{{{
# coding=utf-8
from __future__ import absolute_import, unicode_literals

import sys

import pytest
from django.core.management.base import OutputWrapper
from django.utils.encoding import smart_bytes


def test_bad_unicode_names():
    bad_name = smart_bytes(u'£')
    ow = OutputWrapper(sys.stdout)
    with pytest.raises(UnicodeDecodeError):
        ow.write(bad_name)
}}}"	Bug	closed	Core (Management commands)	1.8	Normal	wontfix	py2		Accepted	1	0	0	1	0	0
