Closed ebrelsford closed 9 years ago
@ebrelsford I have this issue too.
https://github.com/dominno/django-moderation/issues/124
solved it with following changes on diff.py:
value1, value2 = change
if value1 and (type(value1) is str or type(value1) is unicode):
value1 = value1.encode('utf-8')
if value2 and (type(value2) is str or type(value2) is unicode):
value2 = value2.encode('utf-8')
I'm seeing a
UnicodeEncodeError
when editing an instance with unicode in its text fields. It happens in diff.I've worked around this in a local version of
django-moderation
by encodingvalue1
andvalue2
toutf-8
before sending them to TextChange, but I'm not sure that's the best place or solution. Has anyone else run into this, or am I just doing something wrong?