﻿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
12849	django's development server raises an encoding exception when trying to colorize non-ascii text	jype	nobody	"Utf-8 should not be hardcoded, but I don't know where to read terminal's charset from. I suppose utf-8 is acceptable as a fallback nowadays.

{{{
--- django/utils/termcolors.py  (revision 12416)
+++ django/utils/termcolors.py  (working copy)
@@ -38,7 +38,7 @@
         print colorize('and so should this')
         print 'this should not be red'
     """"""
-    text = str(text)
+    text = unicode(text).encode('utf-8')
     code_list = []
     if text == '' and len(opts) == 1 and opts[0] == 'reset':
         return '\x1b[%sm' % RESET
}}}"		closed	django-admin.py runserver	dev		fixed			Accepted	1	0	0	0	0	0
