Opened 9 years ago

Closed 9 years ago

#11443 closed (worksforme)

smart_str can't encode a unicde string

Reported by: spam@… Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I'm getting

encode() takes at most 2 arguments (3 given)

From line 95 of django/utils/ :

elif isinstance(s, unicode):

return s.encode(encoding, errors)

I think it should be

elif isinstance(s, unicode):

return s.encode(encoding)

I'm on python 2.5

Change History (1)

comment:1 Changed 9 years ago by dc

Resolution: worksforme
Status: newclosed

Cannot reproduce this bug:

>>> from django.utils.encoding import smart_str
>>> smart_str(u'iñtërnâtiônàlizætiøn')
Note: See TracTickets for help on using tickets.
Back to Top