803
793
str_or_unicode = e.object
804
794
if isinstance(str_or_unicode, unicode):
808
800
# This handles UnicodeEncodeError or UnicodeDecodeError
809
801
return SmartServerResponse((e.__class__.__name__,
810
802
e.encoding, val, str(e.start), str(e.end), e.reason))