Opened 17 years ago

Closed 12 years ago

#6849 closed Bug (wontfix)

UnicodeEncodeError thrown when unicode messages were sent to outlog&errlog

Reported by: feisan Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords: outlog errlog runfcgi unicode
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Ramiro Morales)

pythin manage.py runfcgi --settings=settings \
  maxchildren=20 maxspare=10 minspare=2 \
  outlog=xxx.out \
  errlog=xxx.err

and the view code is

def someview(request):
  print u'\u6d4b\u8bd5' #should be sent to outlog, but the UnicodeEncodeError thrown 

Attachments (1)

6849.diff (1.2 KB ) - added by Karen Tracey <kmtracey@…> 17 years ago.

Download all attachments as: .zip

Change History (8)

by Karen Tracey <kmtracey@…>, 17 years ago

Attachment: 6849.diff added

comment:1 by Karen Tracey <kmtracey@…>, 17 years ago

That's because the files opened by become_daemon don't have any support for writing unicode to them. You could try the patch I uploaded (I'm not set up to run in this config.) It opens the files specifying they should be utf-8 encoded. Not sure if it should be hardcoded to that or use a setting, but first off maybe someone should test that the approach even works.

comment:2 by Simon Greenhill, 16 years ago

Has patch: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

comment:3 by Ramiro Morales, 16 years ago

Description: modified (diff)

comment:4 by Julien Phalip, 14 years ago

Severity: Normal
Type: Bug

comment:5 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 by Claude Paroz, 12 years ago

Resolution: wontfix
Status: newclosed

Several years without activity, closing...

Note: See TracTickets for help on using tickets.
Back to Top