Improvement to string encoding handling
Taking measures to ensure SnakeCharmR will work properly on systems where the native encoding is not UTF-8:
- Using Python API to check if variable is str/bytes or unicode and handling things correctly. In particular, when we read Python unicode values we flag the resulting R string as UTF-8 since that’s what we Python C API we are using will return;
- Ensuring that Python code being executed is converted to UTF-8 and that the Python interpreter is made aware of that according to PEP 263.