Opened 7 years ago

Closed 2 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)

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

Download all attachments as: .zip

Change History (8)

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

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

  • Has patch set
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 7 years ago by ramiro

  • Description modified (diff)

comment:4 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:5 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:6 Changed 3 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:7 Changed 2 years ago by claudep

  • Resolution set to wontfix
  • Status changed from new to closed

Several years without activity, closing...

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