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 21358,runserver command fails to run with a non-english locale,SvartalF,nobody,"''runserver'' management command writes current datetime to stdout while starting. With a non-english locale it fails for python2.7.3: {{{ svartalf@wonderland:~/projects/irk [django-1.6-upgrade]$ .env/bin/python manage.py runserver Validating models... 0 errors found Unhandled exception in thread started by Traceback (most recent call last): File ""/home/svartalf/projects/irk/.env/lib/python2.7/site-packages/django/utils/autoreload.py"", line 93, in wrapper fn(*args, **kwargs) File ""/home/svartalf/projects/irk/.env/lib/python2.7/site-packages/django/core/management/commands/runserver.py"", line 110, in inner_run ""quit_command"": quit_command, File ""/home/svartalf/projects/irk/.env/lib/python2.7/site-packages/django/core/management/base.py"", line 65, in write if ending and not msg.endswith(ending): UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128) }}} I've found that ''msg'' variable contains that text with type : {{{ Октябрь 31, 2013 - 14:30:02 Django version 1.6c1, using settings 'settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C }}} And it comes from that line of code: https://github.com/django/django/blob/2ca00faa913754cd5860f6e1f23c8da2529c691a/django/core/management/commands/runserver.py#L105 I wrapped it with a ''django.utils.text.smart_text'' and works. Here is a link to my fork commit: https://github.com/svartalf/django/commit/76c058de1bab989c296403e8199aa5fe7f0f83f9 I can pull request it, or maybe, datetime format can be changed to something locale-independent.",Bug,closed,Core (Management commands),dev,Normal,fixed,,,Accepted,1,0,0,0,0,0