fossasia / susi_api_wrapper

SUSI AI API Wrapper http://susi.ai
Apache License 2.0
1.48k stars 31 forks source link

Use UTF-8 parsing on SUSI Server requests #28

Closed betterclever closed 7 years ago

betterclever commented 7 years ago

UTF-8 encoding must be used explicitly for parsing output of all requests made to SUSI Server. Currently, Python 3.4 (max available on Raspberry Pi) uses ASCII Encoding by default which causes issues while parsing some responses.

betterclever commented 7 years ago

Turns out that it is not the issue with Python 3.4, but an issue with system configurations that don't support unicode on shells for Python by default.

It can be fixed by setting the correct environment variable PYTHONIOENCODING=utf-8 according to this blog. https://daveagp.wordpress.com/2010/10/26/what-a-character/

Closing this therefore.