﻿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
5877	Force manage.py to output UTF-8 to avoid UnicodeEncodeErrors	anonymous	nobody	"Got the following Unicode error while trying to run: '''./manage sqlall ws''' with the workstyle-py application.
(Btw the application is writen for Django-0.91 and i found this error while porting it to Django-trunk)

The application tries to insert some Japanese (UTF-8) data into the database while running ```sqlall```.
But the console running the ./manage.py command default to ASCII not UTF-8, thus raises an UnicodeEncodeError.
I figure that since Django should be full unicode now this should work and print out UTF-8 (or at least not raise an EncodeError)

The attached path forces the output print stream into UTF-8.
Hopefully this helps other people with Unicode problems on the console with SQL.

{{{
Traceback (most recent call last):
  File ""./manage.py"", line 11, in ?
    execute_manager(settings)
  File ""/var/www/site/webapp/__init__.py"", line 274, in execute_manager
    
  File ""/var/www/site/webapp/__init__.py"", line 224, in execute
    
  File ""/usr/lib/python2.4/site-packages/django/core/management/base.py"", line 71, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""/usr/lib/python2.4/site-packages/django/core/management/base.py"", line 94, in execute
    print(txt)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 66-68: ordinal not in range(128)
}}}
"	Uncategorized	closed	Core (Management commands)	dev	Normal	wontfix			Design decision needed	1	0	0	0	0	0
