I see I specified the unicode string incorrectly in my shell example. Turns out it doesn't make a difference in this case except for the specifics of the exception, but what it should have been was:
>>> u = u'\u2013' >>> stderr = open('/tmp/stderr.ascii.out', 'w') >>> print >> stderr, '%s' % u Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 0: ordinal not in range(128) >>> import codecs >>> stderr = codecs.open('/tmp/stderr.utf8.out', mode='w', encoding='utf-8') >>> print >> stderr, '%s' % u >>> quit() Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---