ladon-dev-team team mailing list archive
-
ladon-dev-team team
-
Mailing list archive
-
Message #00141
[Question #239269]: ladon failed to return texts with strange characters
New question #239269 on ladon:
https://answers.launchpad.net/ladon/+question/239269
An exception ocurred when trying to encode some string with invalid characters.
Although it could be a responsability for the app developer to properly encode all the strings his services might return, this can be solved within ladon by modifying the typeconverter.py (at /opt/amiga4gas/environments/env2.7/lib/python2.7/site-packages/ladon/types/typeconverter.py) file at the function "to_unicode_string":
...
elif typ==PORTABLE_BYTES:
#val = PORTABLE_STRING(val,self.encoding)
#Fix for dealing with strange characters
val = PORTABLE_STRING(val,self.encoding,errors='replace')
else:
#val = PORTABLE_STRING(val)
#Fix for dealing with strange characters
val = PORTABLE_STRING(val,errors='replace')
...
--
You received this question notification because you are a member of
Ladon Developer, which is an answer contact for ladon.