#5877: UnicodeEncodeError in manage.py sqlall on project with utf8 data
-----------------------+----------------------------------------------------
Reporter:  anonymous   |       Owner:  nobody       
  Status:  new         |   Component:  Uncategorized
 Version:  SVN         |    Keywords:               
   Stage:  Unreviewed  |   Has_patch:  1            
-----------------------+----------------------------------------------------
 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)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5877>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to