Closed MikeBergmann closed 4 years ago
Hi Mike, thank you for contributing! This addition is not needed with the most recent versions of Python (>=3.6): the json content can be deserialized in str or bytes format. Here, the content is in binary format (bytes), so the deserialization works fine, even with unicode characters. I made some tests with russian and japanese characters, encrypted with Boxcryptor, and got no error. This python project is not intended to be industrial-grade with support of multiple versions of Python, and I can't assert that this modification would be enough to ensure backward compatibility.
Hi Jean, thanks for coming back to me. Very appreciated. Yes, you are right. With Python 3.8 it is working out of the box. Therefore I close this one.
Kind regards
Mike
The JSON contains a name element containing the filename which is encoded as UTF8. Having non-ASCII characters in there will produce a TypeError: the JSON object must be str, not 'bytes'.