Opened 10 years ago

Closed 5 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: master
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 runfcgi --settings=settings \
  maxchildren=20 maxspare=10 minspare=2 \
  outlog=xxx.out \

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@…> 10 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by Karen Tracey <kmtracey@…>

Attachment: 6849.diff added

comment:1 Changed 10 years ago by Karen Tracey <kmtracey@…>

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 Changed 10 years ago by Simon Greenhill

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

comment:3 Changed 10 years ago by Ramiro Morales

Description: modified (diff)

comment:4 Changed 7 years ago by Julien Phalip

Severity: Normal
Type: Bug

comment:5 Changed 6 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 Changed 6 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 Changed 5 years ago by Claude Paroz

Resolution: wontfix
Status: newclosed

Several years without activity, closing...

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