← Back to team overview

ladon-dev-team team mailing list archive

Re: [Question #239269]: ladon failed to return texts with strange characters

 

Question #239269 on ladon changed:
https://answers.launchpad.net/ladon/+question/239269

    Status: Open => Solved

Mr T confirmed that the question is solved:

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.