Does anyone know if there is a way to do SWIG string encoding like UCS-4 for Python? The SWIG documentation states that this may be possible with typemaps, but does not contain any other details or examples.
In context, I am working on extending Blender 3D software using a set of Python scripts. We need to associate these scripts with various software tools for robotics, we do this with SWIG to compile Python libraries. Blender uses its own Python 3.2, precompiled with the --with-wide-unicode option, so it uses UCS-4 Unicode strings. However, in defatult, SWIG encodes the strings as UCS-2, so when interacting with Blender I always get the error message: "undefined: PyUnicodeUCS2 _ *".
source share